0

I want to add shadow to my custom dialog. But how to remove this white border? Help me please)

add shadow to custom dialog

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minWidth="300dp"
android:background="@android:drawable/dialog_holo_light_frame"
android:orientation="vertical" >
  <TextView
      android:id="@+id/header"
      android:layout_width="match_parent"
      android:layout_height="20dp"
      android:background="@color/brown"
      android:gravity="top|center"
      android:text=""
      android:textColor="@color/white" />
   ...
   </LinearLayout>
Tom Wally
  • 542
  • 3
  • 8
  • 20
  • 1
    Here you can find the answer http://stackoverflow.com/questions/10433764/alertdialog-how-to-remove-black-borders-above-and-below-view – amaiaeskisabel Aug 15 '15 at 22:35

1 Answers1

0

Add custom style

<style name="Theme.CustomDialog" parent="@android:style/Theme.Translucent.NoTitleBar">
<item name="android:windowIsFloating">true</item>
<item name="android:windowNoTitle">true</item>
<item name="android:padding">10dp</item>
<item name="android:background">#ff90ff90</item>

hicay
  • 78
  • 1
  • 2
  • 8