0
다른 UI로 경고 대화 상자를 사용자 정의하고 있습니다. 다음은 그 예입니다.사용자 정의 대화 상자의 검은 색 밴드
당신이 (빨간색 rectangulars로 강조)이 개 검은 색 띠가 볼 수 있듯이 내가 제거하고 싶습니다.
주 레이아웃이 부모와 일치하기 때문에 이상합니다. 아래 xml에서 볼 수 있듯이.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/lytDialog_takeNowDialog"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/default_side_space"
android:layout_marginRight="@dimen/default_side_space"
android:background="@color/yellow"
android:orientation="vertical" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top|center_horizontal"
android:gravity="center"
android:padding="@dimen/default_side_space"
android:text="Are you sure?"
android:textColor="@color/dialog_text_color"
android:textSize="@dimen/dialog_text_size" />
<LinearLayout
android:id="@+id/lytShowAlert_takeNowDialog"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/black_gradient"
android:orientation="horizontal"
android:padding="@dimen/default_side_space" android:visibility="gone">
<CheckBox
android:id="@+id/chkShowAlert_takeNowDialog"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:text="@string/dont_show_alert"
android:textColor="@android:color/white"
android:textSize="@dimen/dialog_yes_no_size" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="1" >
<Button
android:id="@+id/no_dialog"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/space_among_buttons"
android:layout_weight=".5"
android:background="@drawable/yellow_gradient"
android:padding="@dimen/default_side_space"
android:text="No"
android:textColor="@color/dialog_text_color"
android:textSize="@dimen/dialog_yes_no_size" />
<Button
android:id="@+id/yes_dialog"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/space_among_buttons"
android:layout_weight=".5"
android:background="@drawable/yellow_gradient"
android:padding="@dimen/default_side_space"
android:text="Yes"
android:textColor="@color/dialog_text_color"
android:textSize="@dimen/dialog_yes_no_size" />
</LinearLayout>
사람은 그들을 제거 솔루션을하시기 바랍니다 아는 사람?
. Dialog 스타일을 완벽하게 제어하고 싶다면 바깥쪽에 투명한 공간이있는 Activity를 만드는 것이 더 쉽습니다. 따라서 대화 상자처럼 보이지만 실제로는 기술적 인 활동입니다. 나는 당신이 지금 당면하고있는 것과 비슷한 문제와 싸우면서이 결론에 도달했습니다. – FoamyGuy