Android 自定义AlertDialog的实现
---xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:padding="2dip" >
<EditText
android:id="@+id/edittext1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:typeface="monospace"
android:width="180dip" />
</LinearLayout>
</LinearLayout>
www.zzzyk.com
LayoutInflater inflater = LayoutInflater.from(EA6Activity.this);
final View DialogView = inflater
.inflate(R.layout.dialog, null);
--------AlertDialog创建中输入
builder.setView(DialogView);
补充:移动开发 , Android ,