diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/base/activity/BaseActivity.java b/app/src/main/java/cc/niushuai/project/devcontrol/base/activity/BaseActivity.java new file mode 100644 index 0000000..086e548 --- /dev/null +++ b/app/src/main/java/cc/niushuai/project/devcontrol/base/activity/BaseActivity.java @@ -0,0 +1,12 @@ +package cc.niushuai.project.devcontrol.base.activity; + +import androidx.appcompat.app.AppCompatActivity; + +/** + * Activity基类 + * + * @author niushuai + * @date: 2022/10/18 14:24 + */ +public class BaseActivity extends AppCompatActivity { +} diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/base/fragment/BaseFragment.java b/app/src/main/java/cc/niushuai/project/devcontrol/base/fragment/BaseFragment.java new file mode 100644 index 0000000..c515d19 --- /dev/null +++ b/app/src/main/java/cc/niushuai/project/devcontrol/base/fragment/BaseFragment.java @@ -0,0 +1,12 @@ +package cc.niushuai.project.devcontrol.base.fragment; + +import androidx.fragment.app.Fragment; + +/** + * Fragment基类 + * + * @author niushuai + * @date: 2022/10/18 14:25 + */ +public class BaseFragment extends Fragment { +} diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/ui/device/DeviceActivity.java b/app/src/main/java/cc/niushuai/project/devcontrol/ui/device/DeviceActivity.java index 25c7323..1d2ccbf 100644 --- a/app/src/main/java/cc/niushuai/project/devcontrol/ui/device/DeviceActivity.java +++ b/app/src/main/java/cc/niushuai/project/devcontrol/ui/device/DeviceActivity.java @@ -2,17 +2,18 @@ package cc.niushuai.project.devcontrol.ui.device; import android.os.Bundle; -import androidx.appcompat.app.AppCompatActivity; - +import cc.niushuai.project.devcontrol.base.activity.BaseActivity; import cc.niushuai.project.devcontrol.databinding.DeviceActivityBinding; -public class DeviceActivity extends AppCompatActivity { +public class DeviceActivity extends BaseActivity { private DeviceActivityBinding binding; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + // 隐藏自带的标题栏 + getSupportActionBar().hide(); binding = DeviceActivityBinding.inflate(getLayoutInflater()); setContentView(binding.getRoot()); diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/ui/device/DeviceOperate.java b/app/src/main/java/cc/niushuai/project/devcontrol/ui/device/DeviceOperate.java deleted file mode 100644 index 2f732d2..0000000 --- a/app/src/main/java/cc/niushuai/project/devcontrol/ui/device/DeviceOperate.java +++ /dev/null @@ -1,32 +0,0 @@ -package cc.niushuai.project.devcontrol.ui.device; - -import android.os.Bundle; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; - -import androidx.fragment.app.Fragment; - -import cc.niushuai.project.devcontrol.databinding.DeviceOperateBinding; -/** - * 设备操作页面 - * - * @author niushuai - * @date: 2022/10/17 17:41 - * @return: {@link } - */ -public class DeviceOperate extends Fragment { - - private DeviceOperateBinding thisBinding; - - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - thisBinding = DeviceOperateBinding.inflate(inflater, container, false); - - CharSequence text = thisBinding.deviceOperateFullInfo.getText(); - System.out.println(text); - - return thisBinding.getRoot(); - } - -} diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/device/NavDeviceFragment.java b/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/device/NavDeviceFragment.java index ca26502..4d81033 100644 --- a/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/device/NavDeviceFragment.java +++ b/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/device/NavDeviceFragment.java @@ -25,7 +25,6 @@ import cc.niushuai.project.devcontrol.base.entity.device.DeviceInfo; import cc.niushuai.project.devcontrol.databinding.DeviceItemBinding; import cc.niushuai.project.devcontrol.databinding.MainNavFragmentDeviceBinding; import cc.niushuai.project.devcontrol.ui.device.DeviceActivity; -import cc.niushuai.project.devcontrol.ui.device.DeviceOperate; import cn.hutool.core.util.RandomUtil; /** diff --git a/app/src/main/res/drawable/ic_back.xml b/app/src/main/res/drawable/ic_back.xml new file mode 100644 index 0000000..538730e --- /dev/null +++ b/app/src/main/res/drawable/ic_back.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_back_32.xml b/app/src/main/res/drawable/ic_back_32.xml new file mode 100644 index 0000000..1e23b91 --- /dev/null +++ b/app/src/main/res/drawable/ic_back_32.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_more_h.xml b/app/src/main/res/drawable/ic_more_h.xml new file mode 100644 index 0000000..c7686f8 --- /dev/null +++ b/app/src/main/res/drawable/ic_more_h.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_more_h_32.xml b/app/src/main/res/drawable/ic_more_h_32.xml new file mode 100644 index 0000000..84a5ea6 --- /dev/null +++ b/app/src/main/res/drawable/ic_more_h_32.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_more_v.xml b/app/src/main/res/drawable/ic_more_v.xml new file mode 100644 index 0000000..80ada82 --- /dev/null +++ b/app/src/main/res/drawable/ic_more_v.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_more_v_32.xml b/app/src/main/res/drawable/ic_more_v_32.xml new file mode 100644 index 0000000..f3a5ffc --- /dev/null +++ b/app/src/main/res/drawable/ic_more_v_32.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/img_switch_close.png b/app/src/main/res/drawable/img_switch_close.png new file mode 100644 index 0000000..93e8980 Binary files /dev/null and b/app/src/main/res/drawable/img_switch_close.png differ diff --git a/app/src/main/res/drawable/img_switch_open.png b/app/src/main/res/drawable/img_switch_open.png new file mode 100644 index 0000000..12ee2b3 Binary files /dev/null and b/app/src/main/res/drawable/img_switch_open.png differ diff --git a/app/src/main/res/layout/device_activity.xml b/app/src/main/res/layout/device_activity.xml index a894b93..54b95e4 100644 --- a/app/src/main/res/layout/device_activity.xml +++ b/app/src/main/res/layout/device_activity.xml @@ -1,43 +1,106 @@ + android:layout_height="match_parent" + android:background="@color/main_bg_color"> - - + + - + - + + + \ No newline at end of file diff --git a/app/src/main/res/layout/device_operate.xml b/app/src/main/res/layout/device_operate.xml deleted file mode 100644 index ba41ee5..0000000 --- a/app/src/main/res/layout/device_operate.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index cd2f8ae..88a8c67 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -9,4 +9,5 @@ #FFFFFFFF #FFAFAFAF #F6F6F6 + #00FF0000 \ No newline at end of file diff --git a/app/src/main/res/values/ids.xml b/app/src/main/res/values/ids.xml index d70b4bc..f4b5169 100644 --- a/app/src/main/res/values/ids.xml +++ b/app/src/main/res/values/ids.xml @@ -15,7 +15,23 @@ - + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/iconfront/215更多-横向.svg b/iconfront/215更多-横向.svg new file mode 100644 index 0000000..f89d97c --- /dev/null +++ b/iconfront/215更多-横向.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/iconfront/216更多-竖向.svg b/iconfront/216更多-竖向.svg new file mode 100644 index 0000000..f96e1c3 --- /dev/null +++ b/iconfront/216更多-竖向.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/iconfront/系统返回.svg b/iconfront/系统返回.svg new file mode 100644 index 0000000..94ae368 --- /dev/null +++ b/iconfront/系统返回.svg @@ -0,0 +1 @@ + \ No newline at end of file