I created a custom dialog in which I dynamically insert views through a RelativeLayout. Each time a dialog is displayed, it shows all of my child views just fine, but it has a place at the top that I cannot take into account. I assume that this is reserved for the "name" of the dialog box (which I will not have). Is there a way to remove this space and set up my own dialog only for the content of the content that I am inserting?
here is the xml for the layout:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/handlay"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
by the way, I tried only to have a relative layout of the parent node with the same results.
Here is the .java user dialog.
public class HandResults extends Dialog implements DialogInterface {
HandResults hr;
Timer myTimer;
RelativeLayout handrl;
public HandResults(Context context) {
super(context);
setContentView(R.layout.handresults);
hr = this;
}
public void showHands(){
this.show();
myTimer = null;
myTimer = new Timer();
myTimer.schedule(new TimerTask() {
@Override
public void run() {
hr.cancel();
}
}, 3000);
}
}
and here is what I would call the dialogue:
HandResults mhr = new HandResults(this);
mhr.showHands();
, , , ?