Reputation: 537
When creating a PopupWindow
it shows a border like in the following image:
How do I remove it?
Upvotes: 7
Views: 9020
Reputation: 6166
You need to create a custom layout and set border of parent layout,
i'll giving you a Logical idea for doing this.
Your layout must be like below. dialog_layout.xml
<RelativeLayout>
<LinerLayout> <!-- You can **Set/Remove** all background properties of this LinearLayout-->
<!-- Here are all child element like EditText/ Or TedxView-->
</LinerLayout>
</RelativeLayout>
Here are link for border :
Upvotes: 0
Reputation: 4497
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"
/>
<!-- ..................... -->
Upvotes: 3
Reputation: 3456
Try to add this line :
mPopup.setBackgroundDrawable(new BitmapDrawable());
Upvotes: 24