When creating a PopupWindow
it shows a border like in the following image:
How do I remove it?
Try to add this line :
mPopup.setBackgroundDrawable(new BitmapDrawable());
You can create one custom style and put that border the same color on background, try something like:
New | Android XML File.
myborder.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="1dip"
android:color="@android:color/darker_gray" />
<solid
android:color="@android:color/background_dark" />
<padding
android:left="7dip"
android:top="7dip"
android:right="7dip"
android:bottom="7dip" />
<corners
android:radius="6dip" />
</shape>
Using the drawable Android XML file in a layout
Layout.xml
<LinearLayout
android:orientation="vertical"
android:background="@drawable/myborder"
android:layout_width="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="Text"
/>
<!-- ..................... -->
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With