diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-06-07 11:37:58 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-06-07 11:37:58 +0300 |
commit | cfc4eb26b0c5746e35b0132756532e60c1aa88d0 (patch) | |
tree | d7653a6c853cf045923e2aebf8e0fc183e123a63 /app/src/main | |
parent | 2e8976f6f6c15aa76462e6c1f2f47d328c1388e8 (diff) |
Apply spacer variables instead of using direct values
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/res/layout/activity_exception.xml | 10 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_notes_list_view.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/dialog_account_switcher.xml | 8 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_about_license_tab.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_note_edit.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_note_preview.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/item_account.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/layout/item_notes_list_note_item.xml | 53 | ||||
-rw-r--r-- | app/src/main/res/layout/item_notes_list_section_item.xml | 6 | ||||
-rw-r--r-- | app/src/main/res/layout/item_pref.xml | 4 |
10 files changed, 47 insertions, 46 deletions
diff --git a/app/src/main/res/layout/activity_exception.xml b/app/src/main/res/layout/activity_exception.xml index 5ed3c605..e1e25491 100644 --- a/app/src/main/res/layout/activity_exception.xml +++ b/app/src/main/res/layout/activity_exception.xml @@ -30,12 +30,12 @@ android:layout_width="match_parent" android:layout_height="0dp" android:layout_marginStart="@dimen/spacer_2x" - android:layout_marginLeft="16dp" - android:layout_marginEnd="16dp" - android:layout_marginRight="16dp" + android:layout_marginLeft="@dimen/spacer_2x" + android:layout_marginEnd="@dimen/spacer_2x" + android:layout_marginRight="@dimen/spacer_2x" android:layout_weight="1" android:background="@color/bg_highlighted" - android:padding="8dp" + android:padding="@dimen/spacer_1x" android:scrollbars="horizontal|vertical" android:textIsSelectable="true" android:typeface="monospace" @@ -45,7 +45,7 @@ style="?android:buttonBarStyle" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_margin="16dp" + android:layout_margin="@dimen/spacer_2x" android:gravity="end" android:orientation="horizontal" android:weightSum="1.0"> diff --git a/app/src/main/res/layout/activity_notes_list_view.xml b/app/src/main/res/layout/activity_notes_list_view.xml index da127b07..1b022607 100644 --- a/app/src/main/res/layout/activity_notes_list_view.xml +++ b/app/src/main/res/layout/activity_notes_list_view.xml @@ -43,7 +43,7 @@ android:layout_marginEnd="@dimen/spacer_1x" android:layout_marginRight="@dimen/spacer_1x" android:layout_marginBottom="@dimen/design_appbar_elevation" - app:cardCornerRadius="8dp" + app:cardCornerRadius="@dimen/spacer_1x" app:cardElevation="6dp" app:strokeWidth="0dp"> diff --git a/app/src/main/res/layout/dialog_account_switcher.xml b/app/src/main/res/layout/dialog_account_switcher.xml index 9f762af5..f5260947 100644 --- a/app/src/main/res/layout/dialog_account_switcher.xml +++ b/app/src/main/res/layout/dialog_account_switcher.xml @@ -90,8 +90,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" - android:layout_marginStart="16dp" - android:layout_marginLeft="16dp" + android:layout_marginStart="@dimen/spacer_2x" + android:layout_marginLeft="@dimen/spacer_2x" android:ellipsize="middle" android:singleLine="true" android:text="@string/add_account" @@ -126,8 +126,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" - android:layout_marginStart="16dp" - android:layout_marginLeft="16dp" + android:layout_marginStart="@dimen/spacer_2x" + android:layout_marginLeft="@dimen/spacer_2x" android:ellipsize="middle" android:singleLine="true" android:text="@string/manage_accounts" diff --git a/app/src/main/res/layout/fragment_about_license_tab.xml b/app/src/main/res/layout/fragment_about_license_tab.xml index 1d587793..6afaa763 100644 --- a/app/src/main/res/layout/fragment_about_license_tab.xml +++ b/app/src/main/res/layout/fragment_about_license_tab.xml @@ -35,7 +35,7 @@ style="?android:attr/listSeparatorTextViewStyle" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="16dp" + android:layout_marginTop="@dimen/spacer_2x" android:text="@string/about_icons_disclaimer_title" /> <TextView diff --git a/app/src/main/res/layout/fragment_note_edit.xml b/app/src/main/res/layout/fragment_note_edit.xml index 47dbb27c..1c0417d2 100644 --- a/app/src/main/res/layout/fragment_note_edit.xml +++ b/app/src/main/res/layout/fragment_note_edit.xml @@ -21,7 +21,7 @@ android:ems="10" android:gravity="top" android:inputType="textMultiLine|textCapSentences" - android:padding="16dp" + android:padding="@dimen/spacer_2x" android:textColor="@color/fg_default" android:theme="@style/textViewStyle" tools:text="@tools:sample/lorem/random" /> diff --git a/app/src/main/res/layout/fragment_note_preview.xml b/app/src/main/res/layout/fragment_note_preview.xml index f1f593df..d841f3c2 100644 --- a/app/src/main/res/layout/fragment_note_preview.xml +++ b/app/src/main/res/layout/fragment_note_preview.xml @@ -24,7 +24,7 @@ android:id="@+id/single_note_content" android:layout_width="match_parent" android:layout_height="wrap_content" - android:padding="16dp" + android:padding="@dimen/spacer_2x" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@color/fg_default" android:textIsSelectable="true" diff --git a/app/src/main/res/layout/item_account.xml b/app/src/main/res/layout/item_account.xml index ac14985b..18c6f52e 100644 --- a/app/src/main/res/layout/item_account.xml +++ b/app/src/main/res/layout/item_account.xml @@ -6,8 +6,8 @@ android:background="?attr/selectableItemBackground" android:paddingLeft="6dp" android:paddingStart="6dp" - android:paddingRight="8dp" - android:paddingEnd="8dp"> + android:paddingRight="@dimen/spacer_1x" + android:paddingEnd="@dimen/spacer_1x"> <androidx.appcompat.widget.AppCompatImageView android:id="@+id/accountItemAvatar" diff --git a/app/src/main/res/layout/item_notes_list_note_item.xml b/app/src/main/res/layout/item_notes_list_note_item.xml index 92e924d7..ba88af2a 100644 --- a/app/src/main/res/layout/item_notes_list_note_item.xml +++ b/app/src/main/res/layout/item_notes_list_note_item.xml @@ -12,8 +12,8 @@ android:layout_width="32dp" android:layout_height="32dp" android:layout_gravity="center_vertical" - android:layout_marginLeft="@dimen/button_padding" android:layout_marginStart="@dimen/button_padding" + android:layout_marginLeft="@dimen/button_padding" android:contentDescription="@string/menu_favorite" app:srcCompat="@drawable/ic_star_white_24dp" /> @@ -34,9 +34,9 @@ android:background="@drawable/list_item_background_selector"> <FrameLayout - android:layout_centerVertical="true" android:layout_width="wrap_content" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:layout_centerVertical="true"> <ImageView android:id="@+id/noteFavorite" @@ -51,26 +51,26 @@ android:id="@+id/noteStatus" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_gravity="center_vertical|end" + android:layout_marginTop="12dp" android:layout_marginEnd="4dp" android:layout_marginRight="4dp" - android:layout_marginTop="12dp" - android:layout_gravity="center_vertical|end" android:baseline="14dp" app:srcCompat="@drawable/ic_sync_blue_18dp" /> </FrameLayout> <androidx.appcompat.widget.LinearLayoutCompat - android:layout_weight="1" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingTop="16dp" - android:paddingRight="16dp" - android:paddingEnd="16dp" - android:paddingLeft="0dp" + android:layout_weight="1" + android:orientation="vertical" android:paddingStart="0dp" - android:paddingBottom="16dp" - android:orientation="vertical"> + android:paddingLeft="0dp" + android:paddingTop="@dimen/spacer_2x" + android:paddingEnd="@dimen/spacer_2x" + android:paddingRight="@dimen/spacer_2x" + android:paddingBottom="@dimen/spacer_2x"> <androidx.appcompat.widget.LinearLayoutCompat android:layout_width="match_parent" @@ -80,12 +80,12 @@ android:id="@+id/noteTitle" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_weight="1" android:ellipsize="end" android:maxLines="1" - android:layout_weight="1" - android:textSize="@dimen/primary_font_size" android:textColor="?android:textColorPrimary" - tools:text="@tools:sample/lorem/random"/> + android:textSize="@dimen/primary_font_size" + tools:text="@tools:sample/lorem/random" /> </androidx.appcompat.widget.LinearLayoutCompat> @@ -97,34 +97,35 @@ android:id="@+id/noteExcerpt" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignParentLeft="true" android:layout_alignParentStart="true" + android:layout_alignParentLeft="true" + android:layout_weight="1" android:ellipsize="end" android:maxLines="1" - android:paddingBottom="1dp" android:paddingTop="1dp" - android:layout_weight="1" + android:paddingBottom="1dp" android:textSize="@dimen/secondary_font_size" - tools:text="@tools:sample/lorem/random"/> + tools:text="@tools:sample/lorem/random" /> <TextView android:id="@+id/noteCategory" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignParentRight="true" android:layout_alignParentEnd="true" + android:layout_alignParentRight="true" + android:layout_marginStart="@dimen/spacer_1x" + android:layout_marginLeft="@dimen/spacer_1x" android:background="@drawable/border" android:maxLines="1" - android:paddingBottom="1dp" - android:paddingLeft="8dp" - android:paddingRight="8dp" + android:paddingLeft="@dimen/spacer_1x" android:paddingTop="1dp" - android:layout_marginStart="8dp" - android:layout_marginLeft="8dp" + android:paddingRight="@dimen/spacer_1x" + android:paddingBottom="1dp" android:singleLine="true" android:textColor="?android:textColorPrimary" android:textSize="@dimen/secondary_font_size" - tools:text="@string/category_work"/> + tools:maxLength="15" + tools:text="@tools:sample/lorem/random" /> </androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat> diff --git a/app/src/main/res/layout/item_notes_list_section_item.xml b/app/src/main/res/layout/item_notes_list_section_item.xml index e649617c..6e20555c 100644 --- a/app/src/main/res/layout/item_notes_list_section_item.xml +++ b/app/src/main/res/layout/item_notes_list_section_item.xml @@ -16,8 +16,8 @@ android:paddingStart="56dp" android:paddingLeft="56dp" android:paddingTop="48dp" - android:paddingEnd="16dp" - android:paddingRight="16dp" - android:paddingBottom="8dp" + android:paddingEnd="@dimen/spacer_2x" + android:paddingRight="@dimen/spacer_2x" + android:paddingBottom="@dimen/spacer_1x" android:textColor="@color/fg_default_selection" android:textSize="@dimen/secondary_font_size" />
\ No newline at end of file diff --git a/app/src/main/res/layout/item_pref.xml b/app/src/main/res/layout/item_pref.xml index ad1d078b..48d035ef 100644 --- a/app/src/main/res/layout/item_pref.xml +++ b/app/src/main/res/layout/item_pref.xml @@ -11,7 +11,7 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:contentDescription="@null" - android:padding="16dp" + android:padding="@dimen/spacer_2x" tools:src="@drawable/ic_settings_grey600_24dp" /> <LinearLayout @@ -48,6 +48,6 @@ android:layout_height="match_parent" android:gravity="center_vertical" android:orientation="vertical" - android:padding="16dp" /> + android:padding="@dimen/spacer_2x" /> </LinearLayout>
\ No newline at end of file |