Issue
My popup window design left blank space on top of the window. i try different layout options but space persist.i don't understand how to eliminate this.i am using Custom popup Please help.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textColor="#FFF"
android:text="Input a Value"/>
<ImageView
android:id="@+id/image"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/severity_rating"
android:layout_marginRight="5dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<EditText
android:id="@+id/popup_et"
android:layout_height="wrap_content"
android:layout_width="100dp"
android:inputType="number" />
<Button
android:id="@+id/dialogButtonOK"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="Ok"/>
<Button
android:id="@+id/dialogButtonCancel"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="cancel"/>
</LinearLayout>
</LinearLayout>
Solution
use dialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);
Answered By - Mr Roshan Pawar
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.