chore: layout ignore Nested Weights warnings

This commit is contained in:
Andries Smit 2022-06-01 10:05:34 +02:00
parent 366a325279
commit f4ce5d3f2c
7 changed files with 47 additions and 26 deletions

View file

@ -32,7 +32,8 @@
<View <View
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="0.47" /> android:layout_weight="0.47"
tools:ignore="NestedWeights" />
<LinearLayout <LinearLayout
android:id="@+id/warnings" android:id="@+id/warnings"
@ -115,7 +116,8 @@
<View <View
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="0.08" /> android:layout_weight="0.08"
tools:ignore="NestedWeights" />
<LinearLayout <LinearLayout
android:id="@+id/panel1" android:id="@+id/panel1"
@ -163,7 +165,8 @@
<TextView <TextView
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="0.35" /> android:layout_weight="0.35"
tools:ignore="NestedWeights" />
<TextView <TextView
android:id="@+id/timestamp" android:id="@+id/timestamp"
@ -342,7 +345,7 @@
android:textColor="@color/primary_text_dark" android:textColor="@color/primary_text_dark"
android:textSize="28sp" android:textSize="28sp"
android:textStyle="bold" android:textStyle="bold"
tools:ignore="HardcodedText" /> tools:ignore="HardcodedText, NestedWeights" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -398,7 +401,8 @@
<View <View
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="0.1" /> android:layout_weight="0.1"
tools:ignore="NestedWeights" />
<TextView <TextView
android:id="@+id/loop" android:id="@+id/loop"

View file

@ -15,7 +15,8 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/digitalstyle_bg_full_rect" android:background="@drawable/digitalstyle_bg_full_rect"
android:contentDescription="rect-shape-elements" android:contentDescription="rect-shape-elements"
android:orientation="horizontal" /> android:orientation="horizontal"
tools:ignore="HardcodedText" />
<!-- root-element--> <!-- root-element-->
<LinearLayout <LinearLayout
@ -38,7 +39,8 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="13.95" /> android:layout_weight="13.95"
tools:ignore="NestedWeights" />
<!-- COB --> <!-- COB -->
<LinearLayout <LinearLayout
@ -71,7 +73,7 @@
android:text="@string/activity_carb" android:text="@string/activity_carb"
android:textColor="@color/light_grey" android:textColor="@color/light_grey"
android:textSize="10sp" android:textSize="10sp"
tools:ignore="SmallSp" /> tools:ignore="SmallSp, NestedWeights" />
<TextView <TextView
android:id="@+id/cobView" android:id="@+id/cobView"
@ -131,7 +133,8 @@
android:baselineAligned="false" android:baselineAligned="false"
android:gravity="center_vertical|center_horizontal" android:gravity="center_vertical|center_horizontal"
android:orientation="horizontal" android:orientation="horizontal"
android:weightSum="10"> android:weightSum="10"
tools:ignore="NestedWeights">
<View <View
android:layout_width="0dp" android:layout_width="0dp"
@ -245,7 +248,7 @@
android:text="@string/activity_IOB" android:text="@string/activity_IOB"
android:textColor="@color/light_grey" android:textColor="@color/light_grey"
android:textSize="10sp" android:textSize="10sp"
tools:ignore="SmallSp" /> tools:ignore="SmallSp, NestedWeights" />
<TextView <TextView
android:id="@+id/iobView" android:id="@+id/iobView"
@ -293,7 +296,8 @@
android:layout_marginStart="9dp" android:layout_marginStart="9dp"
android:layout_marginEnd="0dp" android:layout_marginEnd="0dp"
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical"> android:orientation="vertical"
tools:ignore="NestedWeights">
<!-- right side top - spacer 2/10 --> <!-- right side top - spacer 2/10 -->
<View <View
@ -498,7 +502,7 @@
android:textColor="@color/light_grey" android:textColor="@color/light_grey"
android:textSize="10sp" android:textSize="10sp"
android:textStyle="bold" android:textStyle="bold"
tools:ignore="HardcodedText,SmallSp" /> tools:ignore="HardcodedText, SmallSp, NestedWeights" />
<TextView <TextView
android:id="@+id/avgdelta" android:id="@+id/avgdelta"
@ -579,7 +583,8 @@
android:layout_height="0dp" android:layout_height="0dp"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center_horizontal|top" /> android:gravity="center_horizontal|top"
tools:ignore="NestedWeights" />
</LinearLayout> </LinearLayout>

View file

@ -62,7 +62,8 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0px" android:layout_height="0px"
android:layout_weight="0.05" /> android:layout_weight="0.05"
tools:ignore="NestedWeights" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -172,7 +173,8 @@
<View <View
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="0.25" /> android:layout_weight="0.25"
tools:ignore="NestedWeights" />
<lecho.lib.hellocharts.view.LineChartView <lecho.lib.hellocharts.view.LineChartView
android:id="@+id/chart" android:id="@+id/chart"
@ -222,7 +224,8 @@
<View <View
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="0.32" /> android:layout_weight="0.32"
tools:ignore="NestedWeights" />
<LinearLayout <LinearLayout
android:layout_width="0px" android:layout_width="0px"

View file

@ -32,7 +32,8 @@
<View <View
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="0.47" /> android:layout_weight="0.47"
tools:ignore="NestedWeights" />
<LinearLayout <LinearLayout
android:id="@+id/warnings" android:id="@+id/warnings"
@ -115,7 +116,8 @@
<View <View
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="0.08" /> android:layout_weight="0.08"
tools:ignore="NestedWeights" />
<LinearLayout <LinearLayout
android:id="@+id/panel1" android:id="@+id/panel1"
@ -163,7 +165,8 @@
<TextView <TextView
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="0.35" /> android:layout_weight="0.35"
tools:ignore="NestedWeights" />
<TextView <TextView
android:id="@+id/timestamp" android:id="@+id/timestamp"
@ -342,7 +345,7 @@
android:textColor="@color/primary_text_dark" android:textColor="@color/primary_text_dark"
android:textSize="28sp" android:textSize="28sp"
android:textStyle="bold" android:textStyle="bold"
tools:ignore="HardcodedText" /> tools:ignore="HardcodedText, NestedWeights" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -398,7 +401,8 @@
<View <View
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="0.1" /> android:layout_weight="0.1"
tools:ignore="NestedWeights" />
<TextView <TextView
android:id="@+id/loop" android:id="@+id/loop"

View file

@ -15,7 +15,8 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/digitalstyle_bg_full_round" android:background="@drawable/digitalstyle_bg_full_round"
android:contentDescription="round-shape-elements" android:contentDescription="round-shape-elements"
android:orientation="horizontal" /> android:orientation="horizontal"
tools:ignore="HardcodedText" />
<!-- root-element--> <!-- root-element-->
<LinearLayout <LinearLayout

View file

@ -261,7 +261,8 @@
<View <View
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" /> android:layout_weight="1"
tools:ignore="NestedWeights" />
<TextView <TextView
android:id="@+id/watch_time" android:id="@+id/watch_time"

View file

@ -62,7 +62,8 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0px" android:layout_height="0px"
android:layout_weight="0.05" /> android:layout_weight="0.05"
tools:ignore="NestedWeights" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -172,7 +173,8 @@
<View <View
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="0.25" /> android:layout_weight="0.25"
tools:ignore="NestedWeights" />
<lecho.lib.hellocharts.view.LineChartView <lecho.lib.hellocharts.view.LineChartView
android:id="@+id/chart" android:id="@+id/chart"
@ -222,7 +224,8 @@
<View <View
android:layout_width="0px" android:layout_width="0px"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="0.32" /> android:layout_weight="0.32"
tools:ignore="NestedWeights" />
<LinearLayout <LinearLayout
android:layout_width="0px" android:layout_width="0px"