2011. 6. 24. 08:50 안드로이드


LayoutInflater mInflater1 = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
   View mDialogLayout1 = mInflater1.inflate(
     R.layout.alert_dialog_title, null);

   LayoutInflater mInflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
   View mDialogLayout = mInflater.inflate(R.layout.alert_dialog, null);
   
   
   builder.setPositiveButton("다시하기",
     new DialogInterface.OnClickListener() {
      public void onClick(DialogInterface dialog,
        int whichButton) {

      }
     });
   builder.setNegativeButton("다시하기",
     new DialogInterface.OnClickListener() {
      public void onClick(DialogInterface dialog,
        int whichButton) {

      }
     });
   
   builder.setCustomTitle(mDialogLayout1);

   builder.setView(mDialogLayout);

 builder.create();




<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
 xmlns:android="http://schemas.android.com/apk/res/android"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 android:background="@drawable/melon_list_select_bar_longtap"
 >
 <TextView
  android:text="title"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:gravity="center_horizontal|center_vertical"
  android:textSize="24px">

 </TextView>
</LinearLayout>

posted by 욱이다