This article describes the custom personalized Dialog for Android. Share it for your reference, as follows:
Dialog:
mDialog = new Dialog(this, ); (.choose_user); View rootView = (this).inflate( .view_simple_choose_user, null); (rootView); mLinearLayoutUserList = (LinearLayout) rootView .findViewById(.linearLayout_user_list); (); mIsUserListShown = true; listener = new () { @Override public void onDismiss(DialogInterface dialog) { (); mIsUserListShown = false; } }; (listener);
<style name="chooseUserDialogTheme" parent="@android:style/"> <item name="android:background">@android:color/transparent</item> <item name="android:textAppearance">@style/textAppearanceL</item> <item name="android:textColor">@android:color/white</item> <item name="android:windowBackground">@drawable/bg_choose_user_simple</item> <item name="android:popupBackground">@drawable/bg_main_activity_top_bar</item> </style>
.view_simple_choose_user
<?xml version="1.0" encoding="utf-8"?> <HorizontalScrollView xmlns:andro android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/bg_main_activity_top_bar" android:orientation="vertical" > <LinearLayout android: android:layout_width="0dp" android:layout_height="wrap_content" android:orientation="horizontal" > </LinearLayout> </HorizontalScrollView>
For more information about Android related content, please check out the topic of this site:Android development introduction and advanced tutorial》、《Android debugging skills and solutions to common problems》、《Android multimedia operation skills summary (audio, video, recording, etc.)》、《Summary of the usage of basic Android components》、《Android View View Tips Summary》、《Android layout layout tips summary"and"Android control usage summary》
I hope this article will be helpful to everyone's Android programming design.