我们在开发程序是经常会需要软件全屏显示、自定义标题(使用按钮等控件)和其他的需求,今天这一讲就是如何控制Android应用程序的窗体显示.

  requestWindowFeature可以设置的值有:(具体参考 点击链接查看效果
      1.DEFAULT_FEATURES:系统默认状态,一般不需要指定
        // 2.FEATURE_CONTEXT_MENU:启用ContextMenu,默认该项已启用,一般无需指定
        // 3.FEATURE_CUSTOM_TITLE:自定义标题。当需要自定义标题时必须指定。如:标题是一个按钮时
        // 4.FEATURE_INDETERMINATE_PROGRESS:不确定的进度    圆形的进度条
        // 5.FEATURE_LEFT_ICON:标题栏左侧的图标
        // 6.FEATURE_NO_TITLE:无标题
        // 7.FEATURE_OPTIONS_PANEL:启用“选项面板”功能,默认已启用。
        // 8.FEATURE_PROGRESS:进度指示器功能
        // 9.FEATURE_RIGHT_ICON:标题栏右侧的图标

  

2.

  3. Java  代码

   MyProgressBar 

package zyf.test.ProgressBar;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.Toast; public class MyProgressBar extends Activity implements OnClickListener ,
android.content.DialogInterface.OnClickListener { /** Called when the activity is first created. */
private Button up1 , down1; private Button up2 , down2; private Button roundA , roundB , rectA , rectB; private ProgressBar myProgressBar; private AlertDialog.Builder AlterD , AlterD2; private LayoutInflater layoutInflater; private LinearLayout myLayout; private Button myup , mydown; private ProgressBar mypro; private LayoutInflater layoutInflater2; private LinearLayout myLayout2; private static final int Round_A = 110; private static final int Round_B = 120; private static final int Rect_A = 130; private static final int Rect_B = 140; private static int Tag = 0; @ Override
public void onCreate ( Bundle savedInstanceState ) { super.onCreate ( savedInstanceState ); SetFeature ( );
FindView ( );
SetListener ( ); // Activity 中的构造方法 --> 设置标题中的进度条的进度。
setProgress ( myProgressBar.getProgress ( ) * 100 );
setSecondaryProgress ( myProgressBar
.getSecondaryProgress ( ) * 100 ); } /**
* 设置标题为水平进度条的形式,并加载布局文件
*/
private void SetFeature ( ) { // 进度指示器的功能
requestWindowFeature ( Window.FEATURE_PROGRESS ); setContentView ( R.layout.main );
setProgressBarVisibility ( true ); } /**
* 为8个按钮设置监听事件
*/
private void SetListener ( ) { // TODO Auto-generated method stub
up1.setOnClickListener ( this );
down1.setOnClickListener ( this );
up2.setOnClickListener ( this );
down2.setOnClickListener ( this );
roundA.setOnClickListener ( this );
roundB.setOnClickListener ( this );
rectA.setOnClickListener ( this );
rectB.setOnClickListener ( this ); } /**
* 找到布局文件中的组件
*/
private void FindView ( ) { // TODO Auto-generated method stub
// 第二行 左边的加号
up1 = ( Button ) findViewById ( R.id.bt1_Up );
// 第二行 左边的减号
down1 = ( Button ) findViewById ( R.id.bt1_Down );
// 第二行 右边的加号
up2 = ( Button ) findViewById ( R.id.bt2_Up );
// 第二行 右边的减号
down2 = ( Button ) findViewById ( R.id.bt2_Down );
// 第二行 中间的水平进度条
myProgressBar = ( ProgressBar ) findViewById ( R.id.progressbar_updown ); // 圆形A按钮
roundA = ( Button ) findViewById ( R.id.bt_RoundA );
// 圆形B按钮
roundB = ( Button ) findViewById ( R.id.bt_RoundB );
// 长血条A按钮
rectA = ( Button ) findViewById ( R.id.bt_RectA );
// 长血条B按钮
rectB = ( Button ) findViewById ( R.id.bt_RectB ); AlterD = new AlertDialog.Builder ( this );
AlterD2 = new AlertDialog.Builder ( this ); } /**
* 按钮的点击事件
*/
@ Override
public void onClick ( View button ) { // TODO Auto-generated method stub SwitchUPorDown ( button );
setProgress ( myProgressBar.getProgress ( ) * 100 );
setSecondaryProgress ( myProgressBar
.getSecondaryProgress ( ) * 100 );
} /**
* 各个按钮的处理事件
*
* @param button
*/
private void SwitchUPorDown ( View button ) { switch ( button.getId ( ) ) {
case R.id.bt1_Up : {
myProgressBar.incrementProgressBy ( 5 );
}
break;
case R.id.bt1_Down : {
myProgressBar.incrementProgressBy ( - 5 );
}
break;
case R.id.bt2_Up : {
myProgressBar.incrementSecondaryProgressBy ( 5 );
}
break;
case R.id.bt2_Down : {
myProgressBar.incrementSecondaryProgressBy ( - 5 );
}
case R.id.bt_RoundA : {
showDialog ( Round_A );
}
break;
case R.id.bt_RoundB : {
showDialog ( Round_B );
}
break;
case R.id.bt_RectA : {
showDialog ( Rect_A );
}
break;
case R.id.bt_RectB : {
showDialog ( Rect_B );
}
break;
case R.id.myView_BT_Up : {
mypro.incrementProgressBy ( 1 ); }
break;
case R.id.myView_BT_Down : {
mypro.incrementProgressBy ( - 1 );
}
break;
default :
break;
}
} /**
* showDialog 的回调方法 ,根据传递过来的值进行分别的显示信息
*/
@ Override
protected Dialog onCreateDialog ( int id ) { // TODO Auto-generated method stub
switch ( id ) {
case Round_A : {
ProgressDialog mypDialog = new ProgressDialog (
this );
mypDialog.setProgressStyle ( ProgressDialog.STYLE_SPINNER );
mypDialog.setTitle ( "Android" );
mypDialog.setMessage ( getResources ( )
.getString ( R.string.first ) );
mypDialog.setIcon ( R.drawable.android );
mypDialog.setIndeterminate ( false );
mypDialog.setCancelable ( true );
return mypDialog;
}
case Round_B : {
ProgressDialog mypDialog = new ProgressDialog (
this );
mypDialog.setProgressStyle ( ProgressDialog.STYLE_SPINNER );
mypDialog.setTitle ( "Google" );
mypDialog.setMessage ( getResources ( )
.getString ( R.string.second ) );
mypDialog.setIcon ( R.drawable.android );
mypDialog.setButton ( "Google" ,
this );
mypDialog.setIndeterminate ( false );
mypDialog.setCancelable ( true );
return mypDialog;
} case Rect_A : {
ProgressDialog mypDialog = new ProgressDialog (
this );
mypDialog.setProgressStyle ( ProgressDialog.STYLE_HORIZONTAL );
mypDialog.setTitle ( getResources ( )
.getString ( R.string.me ) );
mypDialog.setMessage ( getResources ( )
.getString ( R.string.third ) );
mypDialog.setIcon ( R.drawable.android );
mypDialog.setProgress ( 59 );
mypDialog.setIndeterminate ( true );
mypDialog.setCancelable ( true );
return mypDialog;
} case Rect_B : {
ProgressDialog mypDialog = new ProgressDialog (
this );
mypDialog.setProgressStyle ( ProgressDialog.STYLE_HORIZONTAL );
mypDialog.setTitle ( getResources ( )
.getString ( R.string.HellSun ) );
mypDialog.setMessage ( getResources ( )
.getString ( R.string.fourth ) );
mypDialog.setIcon ( R.drawable.android );
mypDialog.setProgress ( 59 );
mypDialog.setButton ( getResources ( )
.getString ( R.string.HellSun ) ,
this );
mypDialog.setIndeterminate ( true );
mypDialog.setCancelable ( true );
return mypDialog;
}
}
return null;
} /************************************************************************************************************/ /**
* 对话框中按钮的处理事件
*/
@ SuppressWarnings ( "static-access" )
@ Override
public void onClick ( DialogInterface dialog , int which ) { // TODO Auto-generated method stub
if (which == dialog.BUTTON1) {
Toast.makeText ( this ,
"Button1" ,
Toast.LENGTH_LONG )
.show ( );
}
} /**
* 创建选项菜单 圆形 ,长方形 ,以及标题栏圆形进度条
*/
@ Override
public boolean onCreateOptionsMenu ( Menu menu ) { // TODO Auto-generated method stub
menu.add ( 0 , 1 , 1 , "Round" ).setIcon (
R.drawable.ma );
menu.add ( 0 , 2 , 2 , "Rect" ).setIcon (
R.drawable.mb );
;
menu.add ( 0 , 3 , 3 , "Title" ).setIcon (
R.drawable.mc );
return super.onCreateOptionsMenu ( menu );
} /**
* 选项菜单点击事件的处理
*/
@ SuppressWarnings ( "static-access" )
@ Override
public boolean onOptionsItemSelected ( MenuItem item ) { // TODO Auto-generated method stub
switch ( item.getItemId ( ) ) {
case 1 : {
layoutInflater2 = ( LayoutInflater ) getSystemService ( this.LAYOUT_INFLATER_SERVICE );
myLayout2 = ( LinearLayout ) layoutInflater2
.inflate ( R.layout.roundprogress ,
null );
AlterD2.setTitle ( getResources ( )
.getString ( R.string.RoundO ) );
AlterD2.setIcon ( R.drawable.ma );
AlterD2.setMessage ( getResources ( )
.getString ( R.string.ADDView ) );
AlterD2.setView ( myLayout2 );
AlterD2.show ( );
}
break;
case 2 : {
layoutInflater = ( LayoutInflater ) getSystemService ( this.LAYOUT_INFLATER_SERVICE );
myLayout = ( LinearLayout ) layoutInflater
.inflate ( R.layout.myview ,
null );
myup = ( Button ) myLayout.findViewById ( R.id.myView_BT_Up );
mydown = ( Button ) myLayout.findViewById ( R.id.myView_BT_Down );
mypro = ( ProgressBar ) myLayout
.findViewById ( R.id.myView_ProgressBar );
myup.setOnClickListener ( this );
mydown.setOnClickListener ( this );
mypro.setProgress ( Tag );
AlterD.setTitle ( getResources ( )
.getString ( R.string.RectO ) );
AlterD.setIcon ( R.drawable.mb );
AlterD.setMessage ( getResources ( )
.getString ( R.string.ADDView ) );
AlterD.setView ( myLayout );
AlterD.setPositiveButton ( "OK" ,
new DialogInterface.OnClickListener ( ) { @ Override
public void onClick ( DialogInterface dialog ,
int which ) { // TODO Auto-generated method stub
MyProgressBar.Tag = mypro.getProgress ( );
}
} );
AlterD.show ( );
}
break;
case 3 : {
Intent startIntent = new Intent ( );
startIntent.setClass ( MyProgressBar.this ,
MyActivity.class );
startActivity ( startIntent );
}
break;
default :
break;
}
return super.onOptionsItemSelected ( item );
} }

MyActivity

package zyf.test.ProgressBar;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window; public class MyActivity extends Activity { @Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.second);
setProgressBarIndeterminateVisibility(true);
} }

Layout

  main.xml

  

<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/widget40"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/back"
android:orientation="vertical"
android:stretchColumns="1" > <TableRow
android:id="@+id/widget41"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" > <LinearLayout
android:id="@+id/widget42"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" > <ProgressBar
android:id="@+id/widget43"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical" >
</ProgressBar>
</LinearLayout>
</TableRow> <TableRow
android:id="@+id/widget44"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" > <LinearLayout
android:id="@+id/widget45"
android:layout_width="fill_parent"
android:layout_height="fill_parent" > <Button
android:id="@+id/bt1_Down"
android:layout_width="30dp"
android:layout_height="wrap_content"
android:text="-" >
</Button> <Button
android:id="@+id/bt1_Up"
android:layout_width="30dp"
android:layout_height="wrap_content"
android:text="+" >
</Button> <ProgressBar
android:id="@+id/progressbar_updown"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:max="100"
android:progress="50"
android:secondaryProgress="70" >
</ProgressBar> <Button
android:id="@+id/bt2_Down"
android:layout_width="30dp"
android:layout_height="wrap_content"
android:text="-" >
</Button> <Button
android:id="@+id/bt2_Up"
android:layout_width="30dp"
android:layout_height="wrap_content"
android:text="+" >
</Button>
</LinearLayout>
</TableRow> <TableRow
android:layout_width="fill_parent"
android:layout_height="20dp"
android:orientation="horizontal" > <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="大小样式" >
</TextView>
</TableRow> <LinearLayout
android:id="@+id/widget158"
android:layout_width="wrap_content"
android:layout_height="328px"
android:orientation="vertical" > <TextView
android:id="@+id/widget195"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="超大号" >
</TextView> <ProgressBar
android:id="@+id/widget196"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
</ProgressBar> <TextView
android:id="@+id/widget197"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="普通号" >
</TextView> <ProgressBar
android:id="@+id/widget198"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
</ProgressBar> <TextView
android:id="@+id/widget107"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="小号" >
</TextView> <ProgressBar
android:id="@+id/widget108"
style="?android:attr/progressBarStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
</ProgressBar> <TextView
android:id="@+id/widget109"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Title超小号" >
</TextView> <ProgressBar
android:id="@+id/widget110"
style="?android:attr/progressBarStyleSmallTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
</ProgressBar> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="对话框进度条" >
</TextView> <LinearLayout
android:id="@+id/widget324"
android:layout_width="319px"
android:layout_height="wrap_content"
android:background="@drawable/bt_group_back" > <Button
android:id="@+id/bt_RoundA"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:text="圆形A" >
</Button> <Button
android:id="@+id/bt_RoundB"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:text="圆形B" >
</Button> <Button
android:id="@+id/bt_RectA"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:text="长血条A" >
</Button> <Button
android:id="@+id/bt_RectB"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:text="长血条B" >
</Button>
</LinearLayout>
</LinearLayout> </TableLayout>

myview.xml

  

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" > <Button
android:id="@+id/myView_BT_Down"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:text="-" >
</Button> <ProgressBar
android:id="@+id/myView_ProgressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="178dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:progress="57" >
</ProgressBar> <Button
android:id="@+id/myView_BT_Up"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:text="+" >
</Button> </LinearLayout>

roundprogress.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" > <LinearLayout
android:id="@+id/LinearLayout01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
</LinearLayout> <ProgressBar
android:id="@+id/myView_ProgressBar2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:progress="57" >
</ProgressBar> </LinearLayout>

second.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/back">
</LinearLayout>

widgetlayout.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@drawable/widget"
android:layout_height="74dp"
android:layout_width="296dp">
<Button
android:layout_height="wrap_content"
android:text="-"
android:layout_gravity="center_vertical"
android:layout_width="50dp"
android:id="@+id/widget_BT_Down"
android:layout_marginLeft="10dp">
</Button>
<ProgressBar
android:layout_gravity="center_vertical"
android:layout_height="wrap_content"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="178dp"
android:id="@+id/widget_ProgressBar">
</ProgressBar>
<Button
android:layout_height="wrap_content"
android:text="+"
android:layout_gravity="center_vertical"
android:layout_width="50dp"
android:id="@+id/widget_BT_Up">
</Button>
</LinearLayout>

string.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello World, MyProgressBar!</string>
<string name="app_name">MyProgressBar Study</string>
<string name="first">第一个普通圆形ProgressDialog测试</string>
<string name="second">第二个圆形ProgressDialog,带有按钮的。测试</string>
<string name="me">地狱怒兽</string>
<string name="third">第一个长方形ProgressDialog 测试</string>
<string name="HellSun">地狱曙光</string>
<string name="fourth">第二个长方形ProgressDialog ,带有按钮的。测试</string>
<string name="RoundO">圆形进度条</string>
<string name="ADDView">测试View加入进度条</string>
<string name="RectO">长形进度条</string>
</resources>

--------------------------------------------------------------------------------------------------------------------------------------------

可以自动增加和减少的水平进度条

  Layout

  

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" > <ProgressBar
android:id="@+id/porb"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:max="100"
android:progress="50"
android:secondaryProgress="70"
android:text="progress2" /> </LinearLayout>

Java

  

package com.progressbar;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ProgressBar; // 使用Runnable接口
public class MainActivity extends Activity implements Runnable { private Thread th; //声明一条线程 private ProgressBar pb; //声明一个进度条对象 private boolean stateChage; //标识进度值最大最小的状态 @ Override
public void onCreate ( Bundle savedInstanceState ) { super.onCreate ( savedInstanceState );
setContentView ( R.layout.main );
//实例进度条对象
pb = ( ProgressBar ) findViewById ( R.id.porb );
th = new Thread ( this );//实例线程对象
th.start ( );//启动线程
} @ Override
public void run ( ) {//实现Runnable接口抽象函数 while ( true ) {
int current = pb.getProgress ( );//得到当前进度值
int currentMax = pb.getMax ( );//得到进度条的最大进度值
int secCurrent = pb.getSecondaryProgress ( );//得到底层当前进度值
//以下代码实现进度值越来越大,越来越小的一个动态效果
if (stateChage == false) {
if (current >= currentMax) {
stateChage = true;
}
else {
//设置进度值
pb.setProgress ( current + 1 );
//设置底层进度值
pb.setSecondaryProgress ( current + 1 );
}
}
else {
if (current <= 0) {
stateChage = false;
}
else {
pb.setProgress ( current - 1 );
pb.setSecondaryProgress ( current - 1 );
}
}
try {
Thread.sleep ( 50 );
}
catch ( InterruptedException e ) {
// TODO Auto-generated catch block
e.printStackTrace ( );
}
}
}
}

  

Android -- ProgressBar(进度条的使用)的更多相关文章

  1. android ProgressBar 进度条的进度两端是圆角的方法

    转自 http://www.jianshu.com/p/6e7ea842d5ce 另外工作原理可以参考http://blog.csdn.net/lan603168/article/details/44 ...

  2. Android ProgressBar 进度条荧光效果

    http://blog.csdn.net/ywtcy/article/details/7878289 这段时间做项目,产品需求,进度条要做一个荧光效果,类似于Android4.0 浏览器中进度条那种样 ...

  3. Android——ProgressBar(进度条)

    参考资料来源于菜鸟教程--学的不仅是技术,更是梦想! 学习! 1.常用属性讲解与基础实例 从官方文档,我们看到了这样一个类关系图: ProgressBar继承与View类,直接子类有AbsSeekBa ...

  4. Android学习笔记- ProgressBar(进度条)

    本节引言: 本节给大家带来的是Android基本UI控件中的ProgressBar(进度条),ProgressBar的应用场景很多,比如 用户登录时,后台在发请求,以及等待服务器返回信息,这个时候会用 ...

  5. Android 设置进度条背景

    Android 设置进度条背景 直接上代码 <ProgressBar android:id="@+id/progressBar" android:layout_width=& ...

  6. android 自定义进度条颜色

    android 自定义进度条颜色 先看图 基于产品经理各种自定义需求,经过查阅了解,下面是自己对Android自定义进度条的学习过程!   这个没法了只能看源码了,还好下载了源码, sources\b ...

  7. Android之进度条2

    我之前有写过一篇“Android之进度条1”,那个是条形的进度条(显示数字进度),这次实现圆形进度条. 点击查看Android之进度条1:http://www.cnblogs.com/caidupin ...

  8. android的进度条使用

    android的进度条 1.实现的效果 2.布局代码 先写一个my_browser.xml文件 存放WebView <?xml version="1.0" encoding= ...

  9. android多线程进度条

    多线程实现更新android进度条. 实例教程,详细信息我已经注释   android多线程进度条   01package com.shougao.hello; 02 03import android ...

随机推荐

  1. Delphi 的知识体系

    第一部分   快速开发的基础 第1章   Delphi 5下的Windows编程    1 1.1   Delphi产品家族    1 1.2  Delphi是什么    3 1.2.1   可视化开 ...

  2. Linux环境下段错误的产生原因及调试方法小结

    转载自http://www.cnblogs.com/panfeng412/archive/2011/11/06/2237857.html 最近在Linux环境下做C语言项目,由于是在一个原有项目基础之 ...

  3. Spring XML配置文件示例(二)——web.xml

    <?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" ...

  4. 在WPF中使用CefSharp嵌入浏览器

    日常开发中,我们需要将一些Web页面嵌入到桌面客户端软件中.下面我们使用CefSharp嵌入浏览器来实现. 首先先介绍一下CefSharp嵌入式浏览器,它是基于Google浏览器的一个组件,我们可以在 ...

  5. 计算G711语音的打包长度和RTP里timestamp(时间戳)的增长量

    转自:http://blog.csdn.net/xujianglun/article/details/48342367 如何计算G711语音等的打包长度和RTP里timestamp的增长量 一般对于不 ...

  6. PING命令入门详解

    转自:http://www.linkwan.com/gb/tech/htm/928.htm 1.Ping的基础知识 ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很 ...

  7. jsp,图片显示

    问题:jsp中显示项目中image文件夹中的图片 1,项目中image文件夹中有对应的图片 2,<img ,src="/项目名/image/图片名.jpg">,用其他变 ...

  8. c文件操作 (转)

    文件文件的基本概念 所谓“文件”是指一组相关数据的有序集合. 这个数据集有一个名称,叫做文件名. 实际上在前面的各章中我们已经多次使用了文件,例如源程序文件.目标文件.可执行文件.库文件 (头文件)等 ...

  9. SGU 275 To xor or not to xor 高斯消元求N个数中选择任意数XORmax

    275. To xor or not to xor   The sequence of non-negative integers A1, A2, ..., AN is given. You are ...

  10. LeetCode——Single Number(找出数组中只出现一次的数)

    问题: Given an array of integers, every element appears twice except for one. Find that single one. No ...