Procházet zdrojové kódy

chore: flexible styles

beautusg před 7 roky
rodič
revize
2fdb74c08a

+ 2 - 2
app/src/main/res/layout/home_fragment.xml

@@ -37,7 +37,7 @@
         android:id="@+id/home_fragment_tasks"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:padding="12dp"
+        android:padding="@dimen/_12sdp"
         android:text="@string/home_fragment_tasks"
         android:textAppearance="@style/TextAppearance.AppCompat"
         android:textSize="@dimen/_24ssp" />
@@ -74,7 +74,7 @@
         android:padding="8dp"
         android:text="@string/main_fragment_notes"
         android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="18sp" />
+        android:textSize="@dimen/_18ssp" />
 
     <ImageView
         android:id="@+id/home_fragment_call"

+ 31 - 32
app/src/main/res/layout/home_motion_end.xml

@@ -22,7 +22,7 @@
         android:id="@+id/home_fragment_time_format"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginTop="16dp"
+        android:layout_marginTop="@dimen/_16sdp"
         android:alpha="-1"
         android:textSize="@dimen/_13sdp"
         app:layout_constraintStart_toEndOf="@+id/home_fragment_time"
@@ -33,7 +33,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:alpha="-1"
-        android:padding="4dp"
+        android:padding="@dimen/_4sdp"
         android:text="@string/main_placeholder_date"
         android:textSize="@dimen/_12sdp"
         app:layout_constraintBottom_toTopOf="parent"
@@ -44,12 +44,12 @@
         android:id="@+id/home_fragment_tasks"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginBottom="64dp"
-        android:padding="12dp"
+        android:layout_marginBottom="@dimen/_64sdp"
+        android:alpha="-1"
+        android:padding="@dimen/_12sdp"
         android:text="@string/home_fragment_tasks"
         android:textAppearance="@style/TextAppearance.AppCompat"
         android:textSize="@dimen/_24ssp"
-        android:alpha="-1"
         app:layout_constraintBottom_toTopOf="@+id/home_fragment_list"
         app:layout_constraintStart_toStartOf="@+id/home_fragment_list" />
 
@@ -57,10 +57,10 @@
         android:id="@+id/home_fragment_list"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
-        android:layout_marginStart="16dp"
-        android:layout_marginLeft="16dp"
-        android:layout_marginEnd="16dp"
-        android:layout_marginRight="16dp"
+        android:layout_marginStart="@dimen/_16sdp"
+        android:layout_marginLeft="@dimen/_16sdp"
+        android:layout_marginEnd="@dimen/_16sdp"
+        android:layout_marginRight="@dimen/_16sdp"
         app:layout_constraintBottom_toTopOf="@+id/home_fragment_list_exp"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintHorizontal_bias="0.5"
@@ -74,11 +74,11 @@
         android:id="@+id/home_fragment_list_exp"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
-        android:layout_marginStart="16dp"
-        android:layout_marginLeft="16dp"
-        android:layout_marginEnd="16dp"
-        android:layout_marginRight="16dp"
-        android:layout_marginBottom="32dp"
+        android:layout_marginStart="@dimen/_16sdp"
+        android:layout_marginLeft="@dimen/_16sdp"
+        android:layout_marginEnd="@dimen/_16sdp"
+        android:layout_marginRight="@dimen/_16sdp"
+        android:layout_marginBottom="@dimen/_32sdp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintHorizontal_bias="0.5"
@@ -91,13 +91,13 @@
         android:id="@+id/home_fragment_options"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="16dp"
-        android:layout_marginLeft="16dp"
-        android:layout_marginBottom="16dp"
-        android:padding="8dp"
+        android:layout_marginStart="@dimen/_16sdp"
+        android:layout_marginLeft="@dimen/_16sdp"
+        android:layout_marginBottom="@dimen/_16sdp"
+        android:padding="@dimen/_8sdp"
         android:text="@string/main_fragment_options"
         android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="18sp"
+        android:textSize="@dimen/_18ssp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintStart_toStartOf="@+id/home_fragment_list_exp" />
 
@@ -105,13 +105,13 @@
         android:id="@+id/home_fragment_notes"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginEnd="16dp"
-        android:layout_marginRight="16dp"
-        android:layout_marginBottom="16dp"
-        android:padding="8dp"
+        android:layout_marginEnd="@dimen/_16sdp"
+        android:layout_marginRight="@dimen/_16sdp"
+        android:layout_marginBottom="@dimen/_16sdp"
+        android:padding="@dimen/_8sdp"
         android:text="@string/main_fragment_notes"
         android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="18sp"
+        android:textSize="@dimen/_18ssp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="@+id/home_fragment_list_exp" />
 
@@ -119,10 +119,10 @@
         android:id="@+id/home_fragment_call"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="8dp"
-        android:layout_marginLeft="8dp"
-        android:padding="8dp"
+        android:layout_marginStart="@dimen/_8sdp"
+        android:layout_marginLeft="@dimen/_8sdp"
         android:alpha="-1"
+        android:padding="@dimen/_8sdp"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toBottomOf="parent"
         app:srcCompat="@drawable/ic_call"
@@ -132,14 +132,13 @@
         android:id="@+id/home_fragment_camera"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginEnd="8dp"
-        android:layout_marginRight="8dp"
-        android:padding="8dp"
+        android:layout_marginEnd="@dimen/_8sdp"
+        android:layout_marginRight="@dimen/_8sdp"
         android:alpha="-1"
+        android:padding="@dimen/_8sdp"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintTop_toBottomOf="parent"
         app:srcCompat="@drawable/ic_photo_camera"
-        tools:ignore="ContentDescription"
-        tools:layout_editor_absoluteX="320dp" />
+        tools:ignore="ContentDescription" />
 
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 21 - 21
app/src/main/res/layout/home_motion_start.xml

@@ -45,8 +45,8 @@
         android:id="@+id/home_fragment_tasks"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginBottom="4dp"
-        android:padding="12dp"
+        android:layout_marginBottom="@dimen/_4sdp"
+        android:padding="@dimen/_12sdp"
         android:text="@string/home_fragment_tasks"
         android:textAppearance="@style/TextAppearance.AppCompat"
         android:textSize="@dimen/_24ssp"
@@ -57,12 +57,12 @@
         android:id="@+id/home_fragment_list"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
-        android:layout_marginStart="16dp"
-        android:layout_marginLeft="16dp"
-        android:layout_marginTop="32dp"
-        android:layout_marginEnd="16dp"
-        android:layout_marginRight="16dp"
-        android:layout_marginBottom="8dp"
+        android:layout_marginStart="@dimen/_16sdp"
+        android:layout_marginLeft="@dimen/_16sdp"
+        android:layout_marginTop="@dimen/_32sdp"
+        android:layout_marginEnd="@dimen/_16sdp"
+        android:layout_marginRight="@dimen/_16sdp"
+        android:layout_marginBottom="@dimen/_8sdp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintHorizontal_bias="0.0"
@@ -76,12 +76,12 @@
         android:id="@+id/home_fragment_list_exp"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
-        android:layout_marginStart="16dp"
-        android:layout_marginLeft="16dp"
-        android:layout_marginEnd="16dp"
+        android:layout_marginStart="@dimen/_16sdp"
+        android:layout_marginLeft="@dimen/_16sdp"
+        android:layout_marginEnd="@dimen/_16sdp"
         android:alpha="-2"
-        android:layout_marginRight="16dp"
-        android:layout_marginBottom="8dp"
+        android:layout_marginRight="@dimen/_16sdp"
+        android:layout_marginBottom="@dimen/_8sdp"
         android:layout_marginTop="@dimen/_16sdp"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintHorizontal_bias="0.5"
@@ -107,11 +107,11 @@
         android:id="@+id/home_fragment_notes"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:padding="8dp"
+        android:padding="@dimen/_8sdp"
         android:text="@string/main_fragment_notes"
         android:alpha="-3"
         android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="18sp"
+        android:textSize="@dimen/_18ssp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="@+id/home_fragment_list_exp"
         app:layout_constraintTop_toBottomOf="@+id/home_fragment_list_exp" />
@@ -119,9 +119,9 @@
         android:id="@+id/home_fragment_call"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="8dp"
-        android:layout_marginLeft="8dp"
-        android:layout_marginBottom="8dp"
+        android:layout_marginStart="@dimen/_8sdp"
+        android:layout_marginLeft="@dimen/_8sdp"
+        android:layout_marginBottom="@dimen/_8sdp"
         android:padding="@dimen/_8sdp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintStart_toStartOf="parent"
@@ -132,9 +132,9 @@
         android:id="@+id/home_fragment_camera"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginEnd="8dp"
-        android:layout_marginRight="8dp"
-        android:layout_marginBottom="8dp"
+        android:layout_marginEnd="@dimen/_8sdp"
+        android:layout_marginRight="@dimen/_8sdp"
+        android:layout_marginBottom="@dimen/_8sdp"
         android:padding="@dimen/_8sdp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="parent"