[英]How to change position of Alert Dialog
我有一個Android應用程序使用Alertdialog.I我正在為這個對話框設置動畫。我想從左上角開始動畫並在右下角結束。我想,對話框想要在動畫中從左上角移動到右下角持續時間。
我怎樣才能實現這一目標?
試試這個
AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.setTitle("Final Result");
alert.setMessage(msg);
alert.setPositiveButton("OK",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stub
}
});
// dlgAlert.create();
AlertDialog dialog_card = alert.create();
// dlgAlert.requestWindowFeature(Window.FEATURE_NO_TITLE);
// WindowManager.LayoutParams WMLP =
dialog_card.getWindow().setGravity(Gravity.TOP);
dialog_card.show();`
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.