-
Android 定义了两种常用的ProgressDialog进度对话框源码
本源码主要是演示在Android中使用ProgressDialog,定义了两种常用的ProgressDialog进度对话框,一种是长形进度条,这是最早时候的进度条,有点像windows 7风格,另外上一种是圆形的进度条,这种进度条风格在目前的智能手机中已普遍应用,本源码中演示了这两种进度条的外观设计方法以及数据绑定形成进度指示的方法,由线程来控制进度,同时显示加载的百分比。下面是相关的代码段供参考:
// 创建ProgressDialog对象
m_pDialog = new ProgressDialog(Activity01.this);
// 设置进度条风格,风格为长形
m_pDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
// 设置ProgressDialog 标题
m_pDialog.setTitle("提示");
// 设置ProgressDialog 提示信息
m_pDialog.setMessage("这是一个长形对话框进度条");
// 设置ProgressDialog 标题图标
m_pDialog.setIcon(R.drawable.img2);
// 设置ProgressDialog 进度条进度
m_pDialog.setProgress(100);
// 设置ProgressDialog 的进度条是否不明确
m_pDialog.setIndeterminate(false);
// 设置ProgressDialog 是否可以按退回按键取消
m_pDialog.setCancelable(true);
// 让ProgressDialog显示
m_pDialog.show();
完整代码请下载源码。
- 2022-01-25 19:52:21下载
- 积分:1
-
TVINFOR4.04
allwinner a10 AV-IN驱动及android DEMO
- 2013-10-22 15:42:24下载
- 积分:1
-
ActivityAnimation
android Activity间跳转动画,直接可用(android Activity jump between animations directly available)
- 2013-09-04 11:06:05下载
- 积分:1
-
安卓手机间WIFI通信源码
希望帮助新学者,这是一款基于安卓平台的,实现两个移动设备通过WIFI进行相互通信的代码
- 2022-02-28 23:03:22下载
- 积分:1
-
ex_playservice
android 音乐播放器 具有基本的播放功能(android music player)
- 2010-07-17 08:38:54下载
- 积分:1
-
Android OnClickListener监听接口用法范例
Android OnClickListener监听接口用法范例,基础级的例子,
Button button = (Button) findViewById(R.id.Button01);//获取屏幕中的按钮控件对象
button.setOnClickListener(//为按钮对象添加OnClickListener接口实现
//OnClickListener为View的内部接口,其实现者负责监听鼠标点击事件
new View.OnClickListener(){
public void onClick(View v){
LinearLayout ll=(LinearLayout)findViewById(R.id.lla);//获取线性布局对象
String msg=LinearActivity.this.getResources().getString(R.string.button);
Button tempbutton=new Button(LinearActivity.this);//创建一个Button对象
tempbutton.setText(msg+(++count));//设置Button控件显示的内容
tempbutton.setWidth(80);//设置Button的宽度
ll.addView(tempbutton);//向线性布局中添加View
System.out.println("========= count"+count);
- 2023-05-27 15:00:04下载
- 积分:1
-
How to make splash
说明: 制作Android开机Splash.img镜像文件(Making an Android boot Splash.img image file)
- 2020-06-23 12:40:01下载
- 积分:1
-
使用SQLite缓存数据(缓存文本和大图片)例子源码下载
使用SQLite缓存数据,缓存 大图片 小图片 文字 等信息
- 2015-03-02下载
- 积分:1
-
android_google_map
GPS位置回放,GPS轨迹追踪等功能 android系统(GPS )
- 2020-09-19 16:17:52下载
- 积分:1
-
PlaneDemo
android游戏开发教学实例-飞机游戏,有助于初学者尽快熟悉android开发流程,思想。值得一看(android teaching game development examples- aircraft game, helping beginners to familiarize themselves with android development process, thinking. Worth)
- 2011-07-16 09:09:52下载
- 积分:1