2017-12-13 7 views

答えて

0

使用のonClick。あなたは、画面のボタンにダイアログを配置するレイアウトを使用して、あなたに

android:layout_width = "match_parent" 

を使用することができます

public void dialogShow(){ 
    //call next activity or whatever you like to do during button click 
} 

としてあなたの活動ライト機能上よりも、この

<Button 
    android:onClick = dialogShow() /> 

のようなXMLを書くことができます画面の幅を埋めるためのダイアログやレイアウト

0

お試しください

Window window = dialog.getWindow(); 
WindowManager.LayoutParams wlp = window.getAttributes(); 

wlp.gravity = Gravity.BOTTOM; 
window.setAttributes(wlp); 

または使用BottomDialogs

関連する問題