2011-04-15 10 views

答えて

1

Dialogを拡張するクラスを作成し、タイトルなしでrequestWindowFeatureを呼び出します。

public class CustomizeDialog extends Dialog 
{ 
    public CustomizeDialog(Context context) 
    { 
     super(context); 
     /** It will hide the title */ 
     requestWindowFeature(Window.FEATURE_NO_TITLE); 
     setContentView(R.layout.popup); 

次にあなたがXML

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" android:padding="10dip" android:layout_width="fill_parent" 
    android:layout_height="wrap_content" > 

    <ImageButton android:layout_width="wrap_content" 
     android:id="@+id/YOUR_ID" 
     android:layout_height="wrap_content" android:text="Close" 
     android:src="@drawable/YOUR_DRAWABLE" 
      android:background="@null" /> 

をあなたのポップアップを作成することができます次に、あなたが、私はそれを試してみるするJava

CustomizeDialog customizeDialog = new CustomizeDialog(YOUR_CONTEXT); 
customizeDialog.show(); 
+0

から、あなたのポップアップを膨らませることができます。ありがとう – madcoderz

+0

'this.instamapMedia = instamapMedia;'は何をしていますか? –

+0

これは私のカスタムコードです。申し訳ありませんが、私は上記の行を削除しました –

関連する問題