`
mickey_hou
  • 浏览: 239503 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

Android Progrees处理

阅读更多
xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:gravity="center">

<ProgressBar android:id="@+id/progressBar1"
android:layout_width="wrap_content" android:layout_height="wrap_content"></ProgressBar>
<TextView android:layout_width="wrap_content" android:layout_marginTop="10dip"
android:layout_below="@+id/progressBar1" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:id="@+id/textView1"
android:text="Loading...."></TextView>

</RelativeLayout>

public void dialogProgrees(Context context)
    {
        dlg = new AlertDialog.Builder(context).create();
        dlg.show();
        dlg.getWindow().setContentView(R.layout.giftwo);
        LayoutInflater factory = LayoutInflater.from(context);
        View view = factory.inflate(R.layout.giftwo, null);
        dlg.getWindow().setContentView(view);
    }
   
    public void dismiss()
    {
        this.dlg.dismiss();
    }

引用:
DialogDeal deal = new DialogDeal();
deal.dialogProgrees(this);

销毁:
deal.dismiss();
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics