android - White frame around my Alert Dialog Object? -


the problem started when trying dismiss dialog on close button being pressed.

i couldn't working original approach tried 1 , has weird border around dialog when being presented.

here dialog class:

package com.pivotl.postcardsfromalaska;  import android.app.alertdialog; import android.app.dialog; import android.app.dialogfragment; import android.os.bundle; import android.view.layoutinflater; import android.view.view;  public class pfadialogfragment extends dialogfragment {     static pfadialogfragment newinstance() {         pfadialogfragment f = new pfadialogfragment();         return f;     }      @override     public dialog oncreatedialog(bundle savedinstancestate) {         //getting proper access layoutinflater trick         layoutinflater inflater = getactivity().getlayoutinflater();          view view = inflater.inflate(r.layout.enter_actions, null);         //propmanager = new propmanager(getsherlockactivity());         alertdialog.builder builder = new alertdialog.builder(getactivity());         builder.setview(view);         return builder.create();     }  } 

the dialogs view:

<?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="match_parent"     android:padding="3dp" >      <linearlayout         android:id="@+id/linearlayout1"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:layout_centerinparent="true"         android:layout_marginright="166dp"         android:background="@layout/roundedshape"         android:orientation="vertical"         android:paddingbottom="10dp"         android:paddingleft="5dp"         android:paddingright="5dp" >          <button             android:id="@+id/closebutton"             android:layout_width="30dp"             android:layout_height="30dp"             android:layout_marginbottom="20dp"             android:layout_marginleft="135dp"             android:layout_margintop="5dp"             android:background="@drawable/close2x"             android:onclick="closebuttonclick" />          <button             android:id="@+id/takepicturebutton"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:layout_marginbottom="10dp"             android:background="@drawable/big_button2x"             android:onclick="takepicturebuttonclick" />          <button             android:id="@+id/photogallerybutton"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:layout_marginbottom="10dp"             android:background="@drawable/big_button2x"             android:onclick="photogallerybuttonclick" />          <button             android:id="@+id/artistgallerybutton"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:layout_marginbottom="10dp"             android:background="@drawable/big_button2x"             android:onclick="artistgallerybuttonclick" />      </linearlayout>  </relativelayout> 

i access , show on protected void oncreate(bundle savedinstancestate) using :

    if(!diagshowing)    {     showdialog();    } 

but when shows looks below: white border

why displaying border , how can display view?

any help, appreciated!!

add transparent background relativelayout such :

android:background="@android:color/transparent" 

or

android:background="#00000000" 

or can create theme custom dialog


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -