From 2d2cc21e1559b093721e1a2ba1e7e02a074059fc Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Mon, 19 Dec 2022 17:32:42 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E8=AE=BE=E6=9C=BA=E5=99=A8=E4=BA=BA?= =?UTF-8?q?=E8=AE=BE=E7=BD=AEUI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LiveRobotSettingDialogFragment.java | 63 +++++++++++++++++++ .../res/layout/dialog_live_robot_setting.xml | 11 ++++ 2 files changed, 74 insertions(+) create mode 100644 live/src/main/java/com/yunbao/live/dialog/LiveRobotSettingDialogFragment.java create mode 100644 live/src/main/res/layout/dialog_live_robot_setting.xml diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveRobotSettingDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveRobotSettingDialogFragment.java new file mode 100644 index 000000000..13eeae167 --- /dev/null +++ b/live/src/main/java/com/yunbao/live/dialog/LiveRobotSettingDialogFragment.java @@ -0,0 +1,63 @@ +package com.yunbao.live.dialog; + +import android.app.ActionBar; +import android.os.Bundle; +import android.view.Gravity; +import android.view.View; +import android.view.Window; +import android.view.WindowManager; + +import com.yunbao.common.dialog.AbsDialogFragment; +import com.yunbao.common.utils.DpUtil; +import com.yunbao.live.R; + +import androidx.annotation.Nullable; + +/** + * 机器人设置 + */ +public class LiveRobotSettingDialogFragment extends AbsDialogFragment implements View.OnClickListener { + + + + @Override + protected int getLayoutId() { + return R.layout.dialog_live_robot_setting; + } + + @Override + protected int getDialogStyle() { + return R.style.dialog2; + } + + @Override + protected boolean canCancel() { + return true; + } + + @Override + protected void setWindowAttributes(Window window) { + WindowManager.LayoutParams params = window.getAttributes(); + params.width = ActionBar.LayoutParams.MATCH_PARENT; + params.height = DpUtil.dp2px(460); + params.gravity = Gravity.BOTTOM; + window.setAttributes(params); + } + @Override + public void onActivityCreated(@Nullable Bundle savedInstanceState) { + super.onActivityCreated(savedInstanceState); + Bundle bundle = getArguments(); + if (bundle == null) { + return; + } + + + } + + @Override + public void onClick(View v) { + dismiss(); + } + + +} diff --git a/live/src/main/res/layout/dialog_live_robot_setting.xml b/live/src/main/res/layout/dialog_live_robot_setting.xml new file mode 100644 index 000000000..d7ba7721e --- /dev/null +++ b/live/src/main/res/layout/dialog_live_robot_setting.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file