短视频带货源码,解决Dialog 不铺满屏幕问题

hbDialog = new AlertDialog.Builder(this, R.style.Dialog_Fullscreen)
                    .setView(view).create();
            hbDialog.setCanceledOnTouchOutside(true);


            Window win = hbDialog.getWindow();
            win.setGravity(Gravity.BOTTOM);
            win.setWindowAnimations(R.style.dialog_anim);
            win.getDecorView().setPadding(0, 0, 0, 0);
            WindowManager.LayoutParams lp = win.getAttributes();
            lp.width = WindowManager.LayoutParams.MATCH_PARENT;
            lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
            win.setAttributes(lp);

对应的短视频带货源码 style:

 

    

对应的 短视频带货源码动画:

进入:

xmlns:android="http://schemas.android.com/apk/res/android">
    
    android:duration="300"
        android:fromYDelta="100%p" />

弹出:

"1.0" encoding="utf-8"?>
xmlns:android="http://schemas.android.com/apk/res/android">
    android:duration="300"
        android:toYDelta="100%p" />

本文转载自网络,转载仅为分享干货知识,如有侵权欢迎联系云豹科技进行删除处理

你可能感兴趣的:(技术类,android,studio,android,apk,移动开发,weex)