How to remove the title of the custome dialog.
And also remove its space.
Thankyou.
My layout
<?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:gravity="top" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="78dp"
android:layout_marginTop="2dp"
android:background="#00000000"
android:gravity="top"
android:text="Click to the button "
android:textColor="#ffff00"
android:textSize="15sp" />
</LinearLayout>
my code
final Dialog dialog = new Dialog(this);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setTitle("Daialos");
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
dialog.setContentView(R.layout.splash);
dialog.setCancelable(true);
dialog.show();
i am using
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
to avoid the title but its only avoid the text not the space.