다른 스타일로 맞춤 알림 대화 상자를 만들고 싶습니다. 우리가 알다시피, 기본 스타일은 사각형입니다. 나는 너가 이제까지 본 경우에 그것을 사탕 찌그러 뜨림 게임에 좋아하게하고 싶다. 배경 스타일을 변경하려고 시도했지만 기본 배경이 계속 표시됩니다. 내 대화 상자 레이아웃을위한 내 xml 파일입니다.Android에서 맞춤 알림 대화 상자를 만드는 방법은 무엇입니까?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="vertical"
android:background="@drawable/dialog" >
<ImageView
android:id="@+id/ivPic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"/>
<ScrollView
android:id="@+id/svAlert"
android:layout_width="wrap_content"
android:layout_below="@+id/ivPic"
android:layout_height="200px"
>
<TextView
android:id="@+id/tvMessage"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="text"/>
</ScrollView>
<Button
android:id="@+id/bOKE"
android:gravity="center"
android:layout_width="wrap_content"
android:layout_below="@+id/svAlert"
android:layout_height="wrap_content"
android:text="OK"/>
</RelativeLayout>
제발 도와 줄 수 있습니까? 당신에 대한 배경을 지정해야
AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(this, R.style.MyDialogTheme));
... 어떻게 사용합니까? – ElDuderino
@ user3503360 샘플 용 이미지가 있습니까? – rup35h