diff options
| author | Felix Bechstein <f@ub0r.de> | 2017-08-02 11:15:31 +0200 |
|---|---|---|
| committer | Mohamed Zenadi <zeapo@users.noreply.github.com> | 2017-08-02 10:15:31 +0100 |
| commit | e169235d961d93105f210d0c3c4dc29a21008c68 (patch) | |
| tree | 1f684e80351d7b47662675485faef295ec6a281b /app/src/main/res/layout | |
| parent | 37329a67f7f1fb009daeffa4844245be6f370ae0 (diff) | |
| download | HardenedPass-e169235d961d93105f210d0c3c4dc29a21008c68.tar.gz HardenedPass-e169235d961d93105f210d0c3c4dc29a21008c68.zip | |
Fix more lint (#325)
* fix/ignore lint errors, run lint on travis
* fix/ignore some lint warnings
Diffstat (limited to 'app/src/main/res/layout')
| -rw-r--r-- | app/src/main/res/layout/activity_git_clone.xml | 16 | ||||
| -rw-r--r-- | app/src/main/res/layout/activity_git_config.xml | 4 | ||||
| -rw-r--r-- | app/src/main/res/layout/autofill_instructions.xml | 11 | ||||
| -rw-r--r-- | app/src/main/res/layout/autofill_recycler_view.xml | 3 | ||||
| -rw-r--r-- | app/src/main/res/layout/autofill_row_layout.xml | 8 | ||||
| -rw-r--r-- | app/src/main/res/layout/decrypt_layout.xml | 9 | ||||
| -rw-r--r-- | app/src/main/res/layout/encrypt_layout.xml | 3 | ||||
| -rw-r--r-- | app/src/main/res/layout/fragment_autofill.xml | 3 | ||||
| -rw-r--r-- | app/src/main/res/layout/fragment_pwgen.xml | 11 | ||||
| -rw-r--r-- | app/src/main/res/layout/fragment_show_ssh_key.xml | 4 | ||||
| -rw-r--r-- | app/src/main/res/layout/fragment_ssh_keygen.xml | 7 | ||||
| -rw-r--r-- | app/src/main/res/layout/fragment_to_clone_or_not.xml | 7 | ||||
| -rw-r--r-- | app/src/main/res/layout/password_recycler_view.xml | 3 | ||||
| -rw-r--r-- | app/src/main/res/layout/password_row_layout.xml | 7 |
14 files changed, 61 insertions, 35 deletions
diff --git a/app/src/main/res/layout/activity_git_clone.xml b/app/src/main/res/layout/activity_git_clone.xml index 8001f94d..e24fbf99 100644 --- a/app/src/main/res/layout/activity_git_clone.xml +++ b/app/src/main/res/layout/activity_git_clone.xml @@ -11,7 +11,7 @@ <LinearLayout android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:orientation="vertical"> <TextView @@ -20,7 +20,7 @@ android:text="@string/server_name" android:textStyle="bold" style="@android:style/TextAppearance.Large" - android:gravity="left" + android:gravity="start" android:paddingBottom="6dp" android:textColor="@color/blue_grey_500" android:background="@drawable/bottom_line"/> @@ -71,6 +71,7 @@ android:hint="@string/server_user_hint" android:id="@+id/server_user" android:layout_marginLeft="8dp" + android:layout_marginStart="8dp" android:layout_toEndOf="@+id/label_server_user" android:layout_toRightOf="@+id/label_server_user" android:layout_alignParentRight="true" @@ -99,11 +100,13 @@ android:hint="@string/server_url_hint" android:id="@+id/server_url" android:layout_marginLeft="8dp" + android:layout_marginStart="8dp" android:layout_toEndOf="@+id/label_server_url" android:layout_toRightOf="@+id/label_server_url" android:layout_toLeftOf="@+id/label_server_port" android:layout_toStartOf="@+id/label_server_port" - android:inputType="textWebEmailAddress" /> + android:inputType="textWebEmailAddress" + tools:ignore="TextFields" /> <TextView android:id="@+id/label_server_port" @@ -122,6 +125,7 @@ android:hint="@string/server_port_hint" android:id="@+id/server_port" android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" android:inputType="number"/> </RelativeLayout> @@ -147,6 +151,7 @@ android:layout_height="wrap_content" android:hint="@string/server_path_hint" android:layout_marginLeft="8dp" + android:layout_marginStart="8dp" android:id="@+id/server_path" android:layout_toEndOf="@+id/label_server_path" android:layout_toRightOf="@+id/label_server_path" @@ -162,7 +167,7 @@ android:text="@string/server_resulting_url" android:textStyle="bold" style="@android:style/TextAppearance.Large" - android:gravity="left" + android:gravity="start" android:paddingBottom="6dp" android:textColor="@color/blue_grey_500" android:background="@drawable/bottom_line"/> @@ -172,7 +177,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/repository_uri" - android:inputType="textWebEmailAddress" /> + android:inputType="textWebEmailAddress" + tools:ignore="TextFields" /> <TextView android:layout_width="match_parent" diff --git a/app/src/main/res/layout/activity_git_config.xml b/app/src/main/res/layout/activity_git_config.xml index c03ddc05..87db8c9c 100644 --- a/app/src/main/res/layout/activity_git_config.xml +++ b/app/src/main/res/layout/activity_git_config.xml @@ -20,7 +20,7 @@ android:text="@string/git_config" android:textStyle="bold" style="@android:style/TextAppearance.Large" - android:gravity="left" + android:gravity="start" android:paddingBottom="6dp" android:textColor="@color/blue_grey_500" android:background="@drawable/bottom_line"/> @@ -47,6 +47,7 @@ android:hint="@string/git_user_name_hint" android:id="@+id/git_user_name" android:layout_marginLeft="8dp" + android:layout_marginStart="8dp" android:layout_toEndOf="@+id/label_git_user_name" android:layout_toRightOf="@+id/label_git_user_name" android:layout_alignParentRight="true" @@ -76,6 +77,7 @@ android:hint="@string/git_user_email_hint" android:id="@+id/git_user_email" android:layout_marginLeft="35dp" + android:layout_marginStart="35dp" android:layout_toEndOf="@+id/label_git_user_email" android:layout_toRightOf="@+id/label_git_user_email" android:layout_alignParentRight="true" diff --git a/app/src/main/res/layout/autofill_instructions.xml b/app/src/main/res/layout/autofill_instructions.xml index 0316dd91..333cd5fa 100644 --- a/app/src/main/res/layout/autofill_instructions.xml +++ b/app/src/main/res/layout/autofill_instructions.xml @@ -5,7 +5,7 @@ <LinearLayout android:layout_width="fill_parent" - android:layout_height="fill_parent" + android:layout_height="wrap_content" android:orientation="vertical" android:paddingBottom="20dp" android:paddingLeft="24dp" @@ -26,7 +26,8 @@ android:layout_marginBottom="8dp" android:layout_marginTop="8dp" android:adjustViewBounds="true" - android:src="@drawable/autofill_ins_1" /> + android:src="@drawable/autofill_ins_1" + android:contentDescription="@string/autofill_ins_1_hint" /> <ImageView android:id="@+id/imageView2" @@ -34,7 +35,8 @@ android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:adjustViewBounds="true" - android:src="@drawable/autofill_ins_2" /> + android:src="@drawable/autofill_ins_2" + android:contentDescription="@string/autofill_ins_2_hint" /> <TextView android:id="@+id/textView3" @@ -49,7 +51,8 @@ android:layout_height="114dp" android:layout_marginBottom="8dp" android:layout_marginTop="8dp" - android:src="@drawable/autofill_ins_3" /> + android:src="@drawable/autofill_ins_3" + android:contentDescription="@string/autofill_ins_3_hint" /> <TextView android:id="@+id/textView4" diff --git a/app/src/main/res/layout/autofill_recycler_view.xml b/app/src/main/res/layout/autofill_recycler_view.xml index 0b637440..6260be08 100644 --- a/app/src/main/res/layout/autofill_recycler_view.xml +++ b/app/src/main/res/layout/autofill_recycler_view.xml @@ -32,5 +32,6 @@ app:borderWidth="0dp" android:layout_margin="@dimen/fab_compat_margin" android:layout_alignParentBottom="true" - android:layout_alignParentRight="true"/> + android:layout_alignParentRight="true" + android:layout_alignParentEnd="true"/> </RelativeLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/autofill_row_layout.xml b/app/src/main/res/layout/autofill_row_layout.xml index 117a76fc..e07a73d3 100644 --- a/app/src/main/res/layout/autofill_row_layout.xml +++ b/app/src/main/res/layout/autofill_row_layout.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="64dp" android:background="@drawable/autofill_row_background" @@ -17,14 +18,16 @@ <ImageView android:id="@+id/app_icon" android:layout_width="48dp" - android:layout_height="48dp" /> + android:layout_height="48dp" + android:contentDescription="@string/app_icon_hint"/> <LinearLayout android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_marginLeft="8dp" android:gravity="center_vertical" - android:orientation="vertical"> + android:orientation="vertical" + tools:ignore="RtlHardcoded"> <TextView android:id="@+id/app_name" @@ -41,5 +44,4 @@ </LinearLayout> - </LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/decrypt_layout.xml b/app/src/main/res/layout/decrypt_layout.xml index f076dbad..5d9e66ab 100644 --- a/app/src/main/res/layout/decrypt_layout.xml +++ b/app/src/main/res/layout/decrypt_layout.xml @@ -24,6 +24,7 @@ android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_marginLeft="16dp" + android:layout_marginStart="16dp" android:text="CATEGORY HERE" android:textColor="@color/grey_500" android:textIsSelectable="false" @@ -35,6 +36,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/activity_horizontal_margin" + android:layout_marginStart="@dimen/activity_horizontal_margin" android:text="PASSWORD FILE NAME HERE" android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium" android:textColor="@color/accent" @@ -48,7 +50,8 @@ android:layout_height="wrap_content" android:src="@drawable/divider" android:layout_marginTop="16dp" - android:layout_marginBottom="16dp" /> + android:layout_marginBottom="16dp" + tools:ignore="ContentDescription" /> <LinearLayout android:id="@+id/crypto_container" @@ -127,7 +130,7 @@ android:layout_alignParentStart="true" android:layout_alignParentTop="true" android:layout_toLeftOf="@id/crypto_copy_username" - android:layout_toEndOf="@id/crypto_copy_username" + android:layout_toStartOf="@id/crypto_copy_username" android:text="@string/username" android:textColor="@android:color/black" android:textStyle="bold" /> @@ -140,7 +143,7 @@ android:layout_alignParentStart="true" android:layout_below="@id/crypto_username_show_label" android:layout_toLeftOf="@id/crypto_copy_username" - android:layout_toEndOf="@id/crypto_copy_username" + android:layout_toStartOf="@id/crypto_copy_username" android:textColor="@android:color/black" android:textIsSelectable="true" android:typeface="monospace" /> diff --git a/app/src/main/res/layout/encrypt_layout.xml b/app/src/main/res/layout/encrypt_layout.xml index ebb5e4dd..fffc9032 100644 --- a/app/src/main/res/layout/encrypt_layout.xml +++ b/app/src/main/res/layout/encrypt_layout.xml @@ -19,6 +19,7 @@ android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_marginLeft="@dimen/activity_horizontal_margin" + android:layout_marginStart="@dimen/activity_horizontal_margin" android:text="CATEGORY HERE" android:textColor="@color/grey_500" android:textIsSelectable="false" @@ -77,7 +78,7 @@ android:id="@+id/generate_password" android:text="@string/pwd_generate_button" android:onClick="handleClick" - android:layout_gravity="right" /> + android:layout_gravity="end" /> <TextView android:layout_width="wrap_content" diff --git a/app/src/main/res/layout/fragment_autofill.xml b/app/src/main/res/layout/fragment_autofill.xml index ef825c4b..652ea1db 100644 --- a/app/src/main/res/layout/fragment_autofill.xml +++ b/app/src/main/res/layout/fragment_autofill.xml @@ -67,7 +67,8 @@ android:layout_height="wrap_content" android:text="+" android:id="@+id/matchButton" - android:layout_gravity="center_horizontal"/> + android:layout_gravity="center_horizontal" + tools:ignore="HardcodedText" /> <RadioButton android:id="@+id/never" diff --git a/app/src/main/res/layout/fragment_pwgen.xml b/app/src/main/res/layout/fragment_pwgen.xml index 4c3812a7..b5293920 100644 --- a/app/src/main/res/layout/fragment_pwgen.xml +++ b/app/src/main/res/layout/fragment_pwgen.xml @@ -1,10 +1,9 @@ -<ScrollView - xmlns:android="http://schemas.android.com/apk/res/android" +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"> - <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" @@ -25,9 +24,9 @@ <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" + android:baselineAligned="false" android:orientation="horizontal" - android:weightSum="2" - android:baselineAligned="false"> + android:weightSum="2"> <LinearLayout android:layout_width="match_parent" diff --git a/app/src/main/res/layout/fragment_show_ssh_key.xml b/app/src/main/res/layout/fragment_show_ssh_key.xml index 36808f37..f9b3b469 100644 --- a/app/src/main/res/layout/fragment_show_ssh_key.xml +++ b/app/src/main/res/layout/fragment_show_ssh_key.xml @@ -3,9 +3,9 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + <LinearLayout android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:orientation="vertical" android:paddingBottom="20dp" android:paddingLeft="24dp" diff --git a/app/src/main/res/layout/fragment_ssh_keygen.xml b/app/src/main/res/layout/fragment_ssh_keygen.xml index dc1168d4..5f09e401 100644 --- a/app/src/main/res/layout/fragment_ssh_keygen.xml +++ b/app/src/main/res/layout/fragment_ssh_keygen.xml @@ -1,9 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> - <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" @@ -23,7 +24,7 @@ android:layout_height="wrap_content" android:spinnerMode="dropdown" /> - <android.support.design.widget.TextInputLayout xmlns:app="http://schemas.android.com/apk/res-auto" + <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" @@ -45,7 +46,7 @@ android:checked="false" android:text="@string/ssh_keygen_show_passphrase" /> - <android.support.design.widget.TextInputLayout xmlns:app="http://schemas.android.com/apk/res-auto" + <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" diff --git a/app/src/main/res/layout/fragment_to_clone_or_not.xml b/app/src/main/res/layout/fragment_to_clone_or_not.xml index 2b5b1619..170bd1aa 100644 --- a/app/src/main/res/layout/fragment_to_clone_or_not.xml +++ b/app/src/main/res/layout/fragment_to_clone_or_not.xml @@ -17,6 +17,7 @@ android:id="@+id/imageView" android:layout_gravity="center" android:src="@drawable/ic_launcher" + android:contentDescription="@string/app_icon_hint" android:layout_centerVertical="true" android:layout_centerHorizontal="true" /> @@ -44,7 +45,8 @@ android:layout_marginRight="@dimen/activity_horizontal_margin" android:layout_marginEnd="@dimen/activity_horizontal_margin" android:layout_marginTop="@dimen/activity_vertical_margin" - android:textAllCaps="true"/> + android:textAllCaps="true" + tools:ignore="RelativeOverlap" /> </RelativeLayout> <RelativeLayout @@ -77,7 +79,8 @@ android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" - android:textSize="11sp" /> + android:textSize="11sp" + tools:ignore="RelativeOverlap" /> </RelativeLayout> diff --git a/app/src/main/res/layout/password_recycler_view.xml b/app/src/main/res/layout/password_recycler_view.xml index bef664ba..9c56210f 100644 --- a/app/src/main/res/layout/password_recycler_view.xml +++ b/app/src/main/res/layout/password_recycler_view.xml @@ -26,5 +26,6 @@ app:borderWidth="0dp" android:layout_margin="@dimen/fab_compat_margin" android:layout_alignParentBottom="true" - android:layout_alignParentRight="true"/> + android:layout_alignParentRight="true" + android:layout_alignParentEnd="true"/> </RelativeLayout> diff --git a/app/src/main/res/layout/password_row_layout.xml b/app/src/main/res/layout/password_row_layout.xml index 43df2ecf..285af1cf 100644 --- a/app/src/main/res/layout/password_row_layout.xml +++ b/app/src/main/res/layout/password_row_layout.xml @@ -12,18 +12,21 @@ android:paddingBottom="8dp" android:paddingLeft="16dp" android:paddingRight="16dp" - android:gravity="left"> + android:gravity="start"> <ImageView android:layout_width="40dp" android:layout_height="32dp" android:id="@+id/type_image" android:src="@drawable/ic_folder_grey600_24dp" + android:contentDescription="@string/folder_icon_hint" android:alpha="0.5" android:layout_centerVertical="true" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" - android:paddingRight="8dp"/> + android:paddingRight="8dp" + android:paddingEnd="8dp" + tools:ignore="RtlSymmetry" /> <TextView android:id="@+id/type" |
