日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

android的提示页面,android 页面加载中,友情提示界面-Fun言

發(fā)布時間:2024/9/30 编程问答 114 豆豆
生活随笔 收集整理的這篇文章主要介紹了 android的提示页面,android 页面加载中,友情提示界面-Fun言 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

先是布局頁面

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:scrollbars="vertical"

android:orientation="vertical" >

android:id="@+id/myButton1"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

/>

android:id="@+id/myTextView1"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

/>

再 是主 activity

package sql.com;

import android.app.Activity;

import android.app.ProgressDialog;

import android.os.Bundle;

import android.view.View;

import android.widget.Button;

import android.widget.TextView;

public class SqlActivity extends Activity

{

private Button mButton1;

private TextView mTextView1;

public ProgressDialog myDialog = null;

/** Called when the activity is first created. */

@Override

public void onCreate(Bundle savedInstanceState)

{

super.onCreate(savedInstanceState);

setContentView(R.layout.main);

mButton1 =(Button) findViewById(R.id.myButton1);

mTextView1 = (TextView) findViewById(R.id.myTextView1);

mButton1.setOnClickListener(myShowProgressBar);

}

Button.OnClickListener myShowProgressBar = new Button.OnClickListener()

{

public void onClick(View arg0)

{

final CharSequence strDialogTitle = "請稍等";

final CharSequence strDialogBody = "數(shù)據(jù)讀取中 . . . .";

// 顯示Progress對話框

myDialog = ProgressDialog.show

(

SqlActivity.this,

strDialogTitle,

strDialogBody,

true

);

mTextView1.setText(strDialogBody);

new Thread()

{

public void run()

{

try

{

/*在這里寫上要后臺運行的代碼段 */

/* 為了明顯看見效果,以暫停3秒作為示范*/

sleep(3000);

}

catch (Exception e)

{

e.printStackTrace();

}

finally

{

// 卸載所創(chuàng)建的myDialog對象

myDialog.dismiss();

}

}

}.start(); /* 開始運行線程 */

} /*End: public void onClick(View arg0)*/

};

}

自定義 字體顏色

1, 現(xiàn)在 ?在 res/values/styles.xml ?寫入

@android:color/transparent

#ff0000

然后在 T3Activity.java 中

public class T3Activity extends Activity {

/** Called when the activity is first created. */

ProgressDialog myDialog;

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.main);

// 每次使用需要調(diào)用如下, 進行 new 一下 , ----

myDialog = new ProgressDialog(T3Activity.this, R.style.myDialog);//加載style

myDialog.setMessage("sss");

myDialog.show();

// =============================================

//OK 之后只需 dismiss();

myDialog.dismiss();

}

}

總結(jié)

以上是生活随笔為你收集整理的android的提示页面,android 页面加载中,友情提示界面-Fun言的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。