From e036af428c10db045e374e30f0f5e19a1e01e0e4 Mon Sep 17 00:00:00 2001 From: Distopico Vegan Date: Wed, 5 Dec 2018 13:25:33 -0500 Subject: [PATCH] style: come lint fixes --- app/src/main/res/layout/dialog_link.xml | 4 +-- app/src/main/res/layout/fragment_about.xml | 2 +- app/src/main/res/layout/fragment_account.xml | 8 ++--- app/src/main/res/layout/fragment_folder.xml | 4 +-- app/src/main/res/layout/fragment_identity.xml | 8 ++--- app/src/main/res/layout/item_account.xml | 10 +++---- app/src/main/res/layout/item_answer.xml | 4 +-- app/src/main/res/layout/item_attachment.xml | 8 ++--- app/src/main/res/layout/item_drawer.xml | 4 +-- app/src/main/res/layout/item_folder.xml | 12 ++++---- app/src/main/res/layout/item_identity.xml | 12 ++++---- app/src/main/res/layout/item_log.xml | 6 ++-- app/src/main/res/layout/item_operation.xml | 8 ++--- .../main/res/layout/spinner_dropdown_item.xml | 2 +- app/src/main/res/layout/spinner_item.xml | 2 +- app/src/main/res/layout/spinner_item2.xml | 6 ++-- app/src/main/res/layout/widget.xml | 5 ++-- app/src/main/res/values/default.xml | 29 +++++++++++++++++++ app/src/main/res/values/dimens.xml | 3 +- 19 files changed, 84 insertions(+), 53 deletions(-) create mode 100644 app/src/main/res/values/default.xml diff --git a/app/src/main/res/layout/dialog_link.xml b/app/src/main/res/layout/dialog_link.xml index da0a63cc..df963e72 100644 --- a/app/src/main/res/layout/dialog_link.xml +++ b/app/src/main/res/layout/dialog_link.xml @@ -18,8 +18,8 @@ android:id="@+id/etLink" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="https://email.faircode.eu/" + android:text="@string/default_link" android:textAppearance="@style/TextAppearance.AppCompat.Small" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tvOpenLink" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index 8632be60..d5f2fe73 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -22,7 +22,7 @@ android:id="@+id/tvVersion" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="Version 1.0" + android:text="@string/default_version" android:textAppearance="@style/TextAppearance.AppCompat.Medium" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tvName" /> diff --git a/app/src/main/res/layout/fragment_account.xml b/app/src/main/res/layout/fragment_account.xml index f5c24d1c..57dea3ba 100644 --- a/app/src/main/res/layout/fragment_account.xml +++ b/app/src/main/res/layout/fragment_account.xml @@ -47,7 +47,7 @@ android:id="@+id/etDomain" android:layout_width="match_parent" android:layout_height="wrap_content" - android:hint="domain.tld" + android:hint="@string/default_hint_domain" android:inputType="textUri" android:textAppearance="@style/TextAppearance.AppCompat.Medium" app:layout_constraintStart_toStartOf="parent" @@ -113,7 +113,7 @@ android:id="@+id/etHost" android:layout_width="match_parent" android:layout_height="wrap_content" - android:hint="imap.domain.tld" + android:hint="@string/default_hint_imap" android:inputType="textUri" android:textAppearance="@style/TextAppearance.AppCompat.Medium" app:layout_constraintStart_toStartOf="parent" @@ -153,7 +153,7 @@ android:id="@+id/etPort" android:layout_width="match_parent" android:layout_height="wrap_content" - android:hint="993" + android:hint="@string/default_imap_port" android:inputType="number" android:textAppearance="@style/TextAppearance.AppCompat.Medium" app:layout_constraintStart_toStartOf="parent" @@ -331,7 +331,7 @@ android:id="@+id/etInterval" android:layout_width="match_parent" android:layout_height="wrap_content" - android:hint="19" + android:hint="@string/default_interval" android:inputType="number" android:textAppearance="@style/TextAppearance.AppCompat.Medium" app:layout_constraintStart_toStartOf="parent" diff --git a/app/src/main/res/layout/fragment_folder.xml b/app/src/main/res/layout/fragment_folder.xml index f46a2a2c..d32cd1b8 100644 --- a/app/src/main/res/layout/fragment_folder.xml +++ b/app/src/main/res/layout/fragment_folder.xml @@ -96,7 +96,7 @@ android:id="@+id/etAfter" android:layout_width="match_parent" android:layout_height="wrap_content" - android:hint="7" + android:hint="@string/default_sync" android:inputType="number" android:textAppearance="@style/TextAppearance.AppCompat.Medium" app:layout_constraintStart_toStartOf="parent" @@ -142,4 +142,4 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/fragment_identity.xml b/app/src/main/res/layout/fragment_identity.xml index 9643c514..29871885 100644 --- a/app/src/main/res/layout/fragment_identity.xml +++ b/app/src/main/res/layout/fragment_identity.xml @@ -143,7 +143,7 @@ android:id="@+id/etDomain" android:layout_width="match_parent" android:layout_height="wrap_content" - android:hint="domain.tld" + android:hint="@string/default_hint_domain" android:inputType="textUri" android:textAppearance="@style/TextAppearance.AppCompat.Medium" app:layout_constraintStart_toStartOf="parent" @@ -197,7 +197,7 @@ android:id="@+id/etHost" android:layout_width="match_parent" android:layout_height="wrap_content" - android:hint="smtp.domain.tld" + android:hint="@string/default_hint_smtp" android:inputType="textUri" android:textAppearance="@style/TextAppearance.AppCompat.Medium" app:layout_constraintStart_toStartOf="parent" @@ -239,7 +239,7 @@ android:id="@+id/etPort" android:layout_width="match_parent" android:layout_height="wrap_content" - android:hint="465" + android:hint="@string/default_smtp_port" android:inputType="number" android:textAppearance="@style/TextAppearance.AppCompat.Medium" app:layout_constraintStart_toStartOf="parent" @@ -367,4 +367,4 @@ android:layout_height="0dp" app:constraint_referenced_ids="tvEmail,etEmail,tvReplyTo,etReplyTo,tvProvider,spProvider,tvDomain,etDomain,btnAutoConfig,tvSmtp,tvInsecure,tvHost,etHost,cbStartTls,tvPort,etPort,tvUser,etUser,tvPassword,tilPassword,cbSynchronize,cbPrimary,cbStoreSent" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/item_account.xml b/app/src/main/res/layout/item_account.xml index 5e63c347..1b13d2aa 100644 --- a/app/src/main/res/layout/item_account.xml +++ b/app/src/main/res/layout/item_account.xml @@ -38,7 +38,7 @@ android:layout_marginStart="6dp" android:ellipsize="end" android:maxLines="1" - android:text="Name" + android:text="@string/default_name" android:textAppearance="@style/TextAppearance.AppCompat.Medium" app:layout_constraintBottom_toBottomOf="@id/ivPrimary" app:layout_constraintEnd_toStartOf="@+id/ivSync" @@ -60,7 +60,7 @@ android:layout_height="wrap_content" android:layout_marginEnd="6dp" android:layout_marginStart="6dp" - android:text="user" + android:text="@string/default_user" android:textAppearance="@style/TextAppearance.AppCompat.Small" app:layout_constraintEnd_toStartOf="@+id/ivSync" app:layout_constraintStart_toEndOf="@+id/ivPrimary" @@ -84,7 +84,7 @@ android:layout_marginStart="6dp" android:ellipsize="end" android:maxLines="1" - android:text="host" + android:text="@string/default_host" android:textAppearance="@style/TextAppearance.AppCompat.Small" app:layout_constraintBottom_toBottomOf="@id/ivState" app:layout_constraintEnd_toEndOf="parent" @@ -97,7 +97,7 @@ android:layout_height="wrap_content" android:layout_marginEnd="6dp" android:layout_marginStart="6dp" - android:text="error" + android:text="@string/default_error" android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textColor="?attr/colorWarning" app:layout_constraintEnd_toEndOf="parent" @@ -118,4 +118,4 @@ android:background="?attr/colorSeparator" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/marginBottom" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/item_answer.xml b/app/src/main/res/layout/item_answer.xml index c32f129b..61c05f69 100644 --- a/app/src/main/res/layout/item_answer.xml +++ b/app/src/main/res/layout/item_answer.xml @@ -13,7 +13,7 @@ android:layout_marginTop="6dp" android:ellipsize="end" android:maxLines="1" - android:text="Name" + android:text="@string/default_name" android:textAppearance="@style/TextAppearance.AppCompat.Medium" app:layout_constraintEnd_toStartOf="@+id/tvSize" app:layout_constraintStart_toStartOf="parent" @@ -28,4 +28,4 @@ android:background="?attr/colorSeparator" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tvName" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/item_attachment.xml b/app/src/main/res/layout/item_attachment.xml index 8fcb6497..bd23150c 100644 --- a/app/src/main/res/layout/item_attachment.xml +++ b/app/src/main/res/layout/item_attachment.xml @@ -30,7 +30,7 @@ android:layout_marginStart="6dp" android:ellipsize="end" android:maxLines="1" - android:text="Name" + android:text="@string/default_name" android:textAppearance="@style/TextAppearance.AppCompat.Small" app:layout_constraintBottom_toBottomOf="@id/ivAttachments" app:layout_constraintEnd_toStartOf="@+id/tvSize" @@ -42,7 +42,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="6dp" - android:text="10 kB" + android:text="@string/default_attachment_size" android:textAppearance="@style/TextAppearance.AppCompat.Small" app:layout_constraintBottom_toBottomOf="@id/ivAttachments" app:layout_constraintEnd_toStartOf="@+id/ivStatus" @@ -74,7 +74,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginStart="6dp" - android:text="text/plain" + android:text="@string/default_attachment_type" android:textAppearance="@style/TextAppearance.AppCompat.Small" app:layout_constraintEnd_toEndOf="@id/ivStatus" app:layout_constraintStart_toEndOf="@id/ivAttachments" @@ -89,4 +89,4 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tvType" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/item_drawer.xml b/app/src/main/res/layout/item_drawer.xml index ec3cbccf..c810420a 100644 --- a/app/src/main/res/layout/item_drawer.xml +++ b/app/src/main/res/layout/item_drawer.xml @@ -25,9 +25,9 @@ android:gravity="center_vertical" android:maxLines="1" android:minHeight="?android:attr/listPreferredItemHeightSmall" - android:text="Menu item" + android:text="@string/default_menu_item" android:textAppearance="?android:attr/textAppearanceListItemSmall" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toEndOf="@id/ivItem" app:layout_constraintTop_toTopOf="parent" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/item_folder.xml b/app/src/main/res/layout/item_folder.xml index ffa2fb77..c4247cf0 100644 --- a/app/src/main/res/layout/item_folder.xml +++ b/app/src/main/res/layout/item_folder.xml @@ -28,7 +28,7 @@ android:ellipsize="start" android:gravity="center_vertical" android:singleLine="true" - android:text="Name" + android:text="@string/default_name" android:textAppearance="@style/TextAppearance.AppCompat.Medium" app:layout_constraintEnd_toStartOf="@+id/tvAfter" app:layout_constraintStart_toEndOf="@id/ivState" @@ -40,7 +40,7 @@ android:layout_height="24dp" android:layout_marginEnd="6dp" android:gravity="center_vertical" - android:text="123" + android:text="@string/default_messages_count" android:textAppearance="@android:style/TextAppearance.Small" app:layout_constraintEnd_toStartOf="@+id/ivMessages" app:layout_constraintTop_toTopOf="parent" /> @@ -76,7 +76,7 @@ android:layout_height="24dp" android:layout_marginStart="6dp" android:gravity="center_vertical" - android:text="type" + android:text="@string/default_type" android:textAppearance="@android:style/TextAppearance.Small" app:layout_constraintStart_toEndOf="@id/ivUnified" app:layout_constraintTop_toBottomOf="@id/barrier1" /> @@ -87,7 +87,7 @@ android:layout_height="24dp" android:layout_marginEnd="6dp" android:gravity="center_vertical" - android:text="30" + android:text="@string/default_interval" android:textAppearance="@android:style/TextAppearance.Small" app:layout_constraintEnd_toStartOf="@+id/ivSync" app:layout_constraintTop_toBottomOf="@id/barrier1" /> @@ -114,7 +114,7 @@ android:layout_height="wrap_content" android:layout_marginStart="6dp" android:layout_marginEnd="6dp" - android:text="error" + android:text="@string/default_error" android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textColor="?attr/colorWarning" app:layout_constraintEnd_toEndOf="parent" @@ -132,4 +132,4 @@ app:layout_constraintTop_toBottomOf="@id/tvError" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/item_identity.xml b/app/src/main/res/layout/item_identity.xml index 70ee994f..021ec542 100644 --- a/app/src/main/res/layout/item_identity.xml +++ b/app/src/main/res/layout/item_identity.xml @@ -23,7 +23,7 @@ android:layout_marginStart="6dp" android:ellipsize="end" android:maxLines="1" - android:text="Name" + android:text="@string/default_name" android:textAppearance="@style/TextAppearance.AppCompat.Medium" app:layout_constraintBottom_toBottomOf="@+id/ivSync" app:layout_constraintEnd_toStartOf="@+id/ivSync" @@ -46,7 +46,7 @@ android:layout_height="wrap_content" android:layout_marginEnd="6dp" android:layout_marginStart="6dp" - android:text="user" + android:text="@string/default_user" android:textAppearance="@style/TextAppearance.AppCompat.Small" app:layout_constraintEnd_toStartOf="@+id/ivSync" app:layout_constraintStart_toEndOf="@+id/ivPrimary" @@ -69,7 +69,7 @@ android:layout_marginStart="6dp" android:ellipsize="end" android:maxLines="1" - android:text="host" + android:text="@string/default_host" android:textAppearance="@style/TextAppearance.AppCompat.Small" app:layout_constraintBottom_toBottomOf="@id/ivState" app:layout_constraintEnd_toStartOf="@+id/tvAccount" @@ -82,7 +82,7 @@ android:layout_height="wrap_content" android:layout_marginEnd="6dp" android:layout_marginStart="6dp" - android:text="account" + android:text="@string/default_account" android:textAlignment="textEnd" android:textAppearance="@style/TextAppearance.AppCompat.Small" app:layout_constraintBottom_toBottomOf="@id/ivState" @@ -96,7 +96,7 @@ android:layout_height="wrap_content" android:layout_marginEnd="6dp" android:layout_marginStart="6dp" - android:text="error" + android:text="@string/default_error" android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textColor="?attr/colorWarning" app:layout_constraintEnd_toEndOf="parent" @@ -112,4 +112,4 @@ android:background="?attr/colorSeparator" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tvError" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/item_log.xml b/app/src/main/res/layout/item_log.xml index cd75144d..1ee11cc9 100644 --- a/app/src/main/res/layout/item_log.xml +++ b/app/src/main/res/layout/item_log.xml @@ -10,7 +10,7 @@ android:layout_height="wrap_content" android:ellipsize="start" android:singleLine="true" - android:text="12:34:56" + android:text="@string/default_timelog" android:textAppearance="@style/TextAppearance.AppCompat.Small" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -20,9 +20,9 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginStart="6dp" - android:text="log" + android:text="@string/default_log" android:textAppearance="@android:style/TextAppearance.Small" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@id/tvTime" app:layout_constraintTop_toTopOf="parent" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/item_operation.xml b/app/src/main/res/layout/item_operation.xml index 6ab7587c..6ea4b09d 100644 --- a/app/src/main/res/layout/item_operation.xml +++ b/app/src/main/res/layout/item_operation.xml @@ -11,7 +11,7 @@ android:layout_width="50dp" android:layout_height="wrap_content" android:layout_marginStart="6dp" - android:text="Msg#" + android:text="@string/default_msg" android:textAppearance="@style/TextAppearance.AppCompat.Small" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -21,7 +21,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="6dp" - android:text="Name" + android:text="@string/default_name" android:textAppearance="@style/TextAppearance.AppCompat.Small" app:layout_constraintStart_toEndOf="@id/tvMessage" app:layout_constraintTop_toTopOf="parent" /> @@ -31,8 +31,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="6dp" - android:text="Time" + android:text="@string/default_time" android:textAppearance="@style/TextAppearance.AppCompat.Small" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/spinner_dropdown_item.xml b/app/src/main/res/layout/spinner_dropdown_item.xml index e9627702..f6f0c086 100644 --- a/app/src/main/res/layout/spinner_dropdown_item.xml +++ b/app/src/main/res/layout/spinner_dropdown_item.xml @@ -6,6 +6,6 @@ android:layout_height="?android:attr/listPreferredItemHeightSmall" android:ellipsize="marquee" android:singleLine="true" - android:text="Title" + android:text="@string/default_title" android:textAppearance="@style/TextAppearance.AppCompat.Medium" android:textColor="?android:textColorPrimary" /> diff --git a/app/src/main/res/layout/spinner_item.xml b/app/src/main/res/layout/spinner_item.xml index 32c6e6bf..3048210c 100644 --- a/app/src/main/res/layout/spinner_item.xml +++ b/app/src/main/res/layout/spinner_item.xml @@ -6,7 +6,7 @@ android:layout_height="wrap_content" android:ellipsize="marquee" android:singleLine="true" - android:text="Title" + android:text="@string/default_title" android:textAlignment="inherit" android:textAppearance="@style/TextAppearance.AppCompat.Medium" android:textColor="?android:textColorPrimary" /> diff --git a/app/src/main/res/layout/spinner_item2.xml b/app/src/main/res/layout/spinner_item2.xml index 7e24181f..f1fd64cc 100644 --- a/app/src/main/res/layout/spinner_item2.xml +++ b/app/src/main/res/layout/spinner_item2.xml @@ -10,7 +10,7 @@ android:id="@android:id/text1" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="Name" + android:text="@string/default_name" android:textAppearance="@style/TextAppearance.AppCompat.Medium" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -19,8 +19,8 @@ android:id="@android:id/text2" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="Email" + android:text="@string/default_email" android:textAppearance="@style/TextAppearance.AppCompat.Small" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@android:id/text1" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/widget.xml b/app/src/main/res/layout/widget.xml index d2ba3c44..b9a47577 100644 --- a/app/src/main/res/layout/widget.xml +++ b/app/src/main/res/layout/widget.xml @@ -10,7 +10,8 @@ @@ -20,7 +21,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" - android:text="--" + android:text="@string/default_count" android:textColor="@color/colorWidgetForeground" android:textSize="15sp" android:textStyle="bold" /> diff --git a/app/src/main/res/values/default.xml b/app/src/main/res/values/default.xml new file mode 100644 index 00000000..472b332c --- /dev/null +++ b/app/src/main/res/values/default.xml @@ -0,0 +1,29 @@ + + + -- + Email + Name + Title + Version 1.0 + Time + 12:34:56 + log + Msg# + User + Host + Type + Account + Error + 19 + domain.tld + imap.domain.tld + smtp.domain.tld + 993 + 465 + https://framagit.org/dystopia-project + 7 + 10 kB + text/plain + Menu item + 120 + diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 50d91c5f..c985d6e8 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -1,8 +1,9 @@ 12dp + 3dp + 6dp 12dp - 6dp 6dp 6dp 40dp