From 61a1a7cac25625b8ce03c2d10adab6d2200e1b88 Mon Sep 17 00:00:00 2001 From: niushuai233 Date: Mon, 17 Oct 2022 15:09:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../devcontrol/ui/nav/main/device/NavDeviceFragment.java | 2 +- app/src/main/res/layout/activity_main.xml | 4 ++-- app/src/main/res/layout/main_nav_fragment_device.xml | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/device/NavDeviceFragment.java b/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/device/NavDeviceFragment.java index 7705df9..fa36d72 100644 --- a/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/device/NavDeviceFragment.java +++ b/app/src/main/java/cc/niushuai/project/devcontrol/ui/nav/main/device/NavDeviceFragment.java @@ -57,7 +57,7 @@ public class NavDeviceFragment extends Fragment { deviceGv.setSelector(new ColorDrawable(Color.TRANSPARENT)); List> dataItem = new ArrayList<>(); - for (int i = 0; i < 3; i++) { + for (int i = 0; i < 31; i++) { HashMap m1 = new HashMap<>(); m1.put("device_item_cardView_image", R.drawable.ic_device_light_1); diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index f0e3842..3e2451b 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -10,7 +10,7 @@ android:id="@+id/main_nav_host_fragment_activity" android:name="androidx.navigation.fragment.NavHostFragment" android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="0dp" app:defaultNavHost="true" app:layout_constraintBottom_toTopOf="@id/bottom_nav_view" app:layout_constraintHorizontal_bias="0.0" @@ -30,4 +30,4 @@ app:layout_constraintRight_toRightOf="parent" app:menu="@menu/main_nav_menu" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/main_nav_fragment_device.xml b/app/src/main/res/layout/main_nav_fragment_device.xml index 8eadd04..d02cacb 100644 --- a/app/src/main/res/layout/main_nav_fragment_device.xml +++ b/app/src/main/res/layout/main_nav_fragment_device.xml @@ -20,7 +20,8 @@