直接上代码
//TODO 如何往里塞View
private void displaySelectArriveTime(){
AlertDialog dialog = new AlertDialog.Builder(SubmitOrderActivity.this).setView(R.layout.fragment_seller_buy_vegetables).setTitle("title").setMessage("message").create();
Window window = dialog.getWindow();
window.setGravity(Gravity.BOTTOM); //此处可以设置dialog显示的位置
window.setWindowAnimations(R.style.footerViewStyle); //添加动画
dialog.show();
}
<style name="footerViewStyle" parent="android:Animation">
<item name="@android:windowEnterAnimation">@anim/dialog_enter</item> //进入时的动画
<item name="@android:windowExitAnimation">@anim/dialog_exit</item> //退出时的动画
</style>

本文介绍如何在Android应用中创建一个自定义的底部弹窗对话框,并演示了如何设置对话框的内容视图、标题、消息以及动画效果。
1106

被折叠的 条评论
为什么被折叠?



