@Override
public void onResume() {
super.onResume();
getDialog().getWindow().setLayout(DeviceUtil.getDeviceWidth(), ResUtils.dp2px(295));
}
WindowManager.LayoutParams params = getDialog().getWindow()
.getAttributes();
params.gravity = Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL;
params.windowAnimations = R.style.bottomSheet_animation;
getDialog().getWindow().setAttributes(params);
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
WindowManager.LayoutParams params = getDialog().getWindow()
.getAttributes();
params.gravity = Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL;
params.windowAnimations = R.style.bottomSheet_animation;
getDialog().getWindow().setAttributes(params);
getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);
getDialog().setCanceledOnTouchOutside(true);
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
mContentView = inflater.inflate(R.layout.fragment_create_quick, container, false);
return mContentView;
}
@Override
public void onResume() {
super.onResume();
getDialog().getWindow().setLayout(DeviceUtil.getDeviceWidth(), HlyUtils.dp2px(380));
}
<style name="bottomSheet_animation" parent="@android:style/Animation">
<item name="android:windowEnterAnimation">@anim/slide_in_bottom</item>
<item name="android:windowExitAnimation">@anim/slide_out_bottom</item>
</style>
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="300"
android:fromYDelta="100.0%p"
android:toYDelta="0.0" />
</set>
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="300"
android:fromYDelta="0%p"
android:toYDelta="100%p" />
</set>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有