After setting the width and the same size are not set
private void show_menu_dlg ()
{
/ / Load dialog resource interface
LayoutInflater factory = LayoutInflater.from (this.getContext ());
final View dlgview = factory.inflate (R.layout.player_menu, null);
AlertDialog.Builder dlg_login = new AlertDialog.Builder (this.getContext ());
/ / The dialog layout settings to view
dlg_login.setView (dlgview);
/ / Create and display the dialog box
AlertDialog dlg = dlg_login.create ();
/ / Set the dialog position
LayoutParams lp = dlg.getWindow () getAttributes ();.
/ / Dlg.getWindow () setGravity (Gravity.RIGHT | Gravity.CENTER_VERTICAL);.
lp.x = m_screen_width - 64;
lp.width = 64;
dlg.getWindow () setAttributes (lp);.
dlg.setCanceledOnTouchOutside (true);
dlg.show ();
}
Layout file:
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
android: layout_width = "fill_parent"
android: layout_height = "fill_parent"
android: background = "# 000000"
android: orientation = "vertical">android: id = "@ + id / playermenu_previous"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: layout_margin = "5dp"
android: padding = "0dp"
android: src = "@ drawable / up" />android: id = "@ + id / playermenu_mode"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: layout_margin = "5dp"
android: padding = "0dp"
android: src = "@ drawable / play" />android: id = "@ + id / playermenu_next"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: layout_margin = "5dp"
android: padding = "0dp"
android: src = "@ drawable / down" />android: id = "@ + id / playermenu_relogin"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: layout_margin = "5dp"
android: padding = "0dp"
android: src = "@ drawable / relogin" />
"
Reply:
When I want to make the width of the dialog box only imagebutton width so great, then the dialog that appears in the rightmost
Reply:
This effect is the dialog box you determine it?
Reply:
Yes, with a pop-up box simulation menu displayed on the right side
Reply:
Landlord, this stuff you have to show () the dialog, set the property again.
private void show_menu_dlg ()
{
/ / Load dialog resource interface
LayoutInflater factory = LayoutInflater.from (this.getContext ());
final View dlgview = factory.inflate (R.layout.player_menu, null);
AlertDialog.Builder dlg_login = new AlertDialog.Builder (this.getContext ());
/ / The dialog layout settings to view
dlg_login.setView (dlgview);
/ / Create and display the dialog box
AlertDialog dlg = dlg_login.create ();
dlg.show ();
/ / Set the dialog position
LayoutParams lp = dlg.getWindow () getAttributes ();.
/ / Dlg.getWindow () setGravity (Gravity.RIGHT | Gravity.CENTER_VERTICAL);.
lp.x = m_screen_width - 64;
lp.width = 64;
dlg.getWindow () setAttributes (lp);.
dlg.setCanceledOnTouchOutside (true);
}
Reply:
First show out. . . . . . . . . Somehow. . . . .
No comments:
Post a Comment