80,354
社区成员
发帖
与我相关
我的任务
分享
private ProgressDialog progDialog = null;
progDialog = new ProgressDialog(this);
progDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
progDialog.setIndeterminate(false);
progDialog.setCancelable(true);
progDialog.setMessage("正在努力加载中...\n");
progDialog.show();
完成加载用progDialog.dismiss();<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#cccccc" >
<EditText
android:id="@+id/textsource"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/textsourcehint" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal" >
<Button
android:id="@+id/btok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/buttonok" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#cccccc" >
<EditText
android:id="@+id/textresult"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/textresulthint" />
</LinearLayout>
</LinearLayout>