Use android:layout_weight
<LinearLayout
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:weightSum="100"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_weight="70" >
</LinearLayout>
<LinearLayout android:id="@+id/widget32" android:orientation="horizontal"
android:layout_weight="30" android:layout_width="fill_parent"
android:layout_height="wrap_content">
</LinearLayout>
</LinearLayout>
final ProgressDialog dialog = ProgressDialog . show ( this , "Title" , "Message" , true ); final Handler handler = new Handler () { public void handleMessage ( Message msg ) { dialog . dismiss (); } } ; Thread t = new Thread () { public void run () { // write process code here. handler . sendEmptyMessage ( 0 ); } } ; t . start ();
Comments
Post a Comment