diff options
author | Harsh Shandilya <msfjarvis@gmail.com> | 2019-10-01 22:14:28 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-01 22:14:28 +0530 |
commit | 073346c157ec34b750d175c8543f346e6eae94de (patch) | |
tree | a55d24ef43563f3a2d03d7938a1e96c1f5cd1caf /app/src/main/res/layout | |
parent | c9dc4034f12b62f4470f92fb13ecd72871f4a5b7 (diff) |
Redesign UI and introduce dark theme (#519)
Caveats:
- The openpgp preference had to be removed because the open-intents developers are too lazy to update their libraries. Over the coming weeks I will be reimplementing a local solution for this instead.
- The autofill dialog is broken but I since it is being worked on in #410 already I'm not going to bother fixing it.
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r-- | app/src/main/res/layout/activity_git_clone.xml | 358 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_git_config.xml | 198 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_pwdstore.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/layout/autofill_instructions.xml | 17 | ||||
-rw-r--r-- | app/src/main/res/layout/autofill_recycler_view.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/layout/autofill_row_layout.xml | 36 | ||||
-rw-r--r-- | app/src/main/res/layout/decrypt_layout.xml | 423 | ||||
-rw-r--r-- | app/src/main/res/layout/encrypt_layout.xml | 146 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_autofill.xml | 16 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_pwgen.xml | 7 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_show_ssh_key.xml | 5 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_ssh_keygen.xml | 18 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_to_clone_or_not.xml | 14 | ||||
-rw-r--r-- | app/src/main/res/layout/git_passphrase_layout.xml | 1 | ||||
-rw-r--r-- | app/src/main/res/layout/password_recycler_view.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/layout/password_row_layout.xml | 18 |
16 files changed, 611 insertions, 658 deletions
diff --git a/app/src/main/res/layout/activity_git_clone.xml b/app/src/main/res/layout/activity_git_clone.xml index c96a6201..c4612765 100644 --- a/app/src/main/res/layout/activity_git_clone.xml +++ b/app/src/main/res/layout/activity_git_clone.xml @@ -1,211 +1,187 @@ -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" +<androidx.constraintlayout.widget.ConstraintLayout 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" - android:paddingLeft="@dimen/activity_horizontal_margin" - android:paddingRight="@dimen/activity_horizontal_margin" - android:paddingTop="@dimen/activity_vertical_margin" - android:paddingBottom="@dimen/activity_vertical_margin" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:padding="@dimen/activity_horizontal_margin" tools:context="com.zeapo.pwdstore.git.GitActivity" - android:background="@android:color/white"> - - <LinearLayout + android:background="?android:attr/windowBackground"> + + <androidx.appcompat.widget.AppCompatTextView + style="@style/TextAppearance.MaterialComponents.Headline5" + android:id="@+id/server_label" + android:textStyle="bold" + android:textSize="24sp" + android:text="@string/server_name" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical"> + android:layout_margin="8dp" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> - <TextView - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:text="@string/server_name" - android:textStyle="bold" - style="@android:style/TextAppearance.Large" - android:gravity="start" - android:paddingBottom="6dp" - android:textColor="@color/blue_grey_500" - android:background="@drawable/bottom_line"/> - - <RelativeLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:layout_gravity="center_vertical"> - - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/server_protocol" - android:id="@+id/label_server_protocol" - android:layout_centerVertical="true" - android:layout_alignParentStart="true" /> - - <Spinner - android:id="@+id/clone_protocol" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_toEndOf="@+id/label_server_protocol" /> - </RelativeLayout> - - <RelativeLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:layout_gravity="center_vertical"> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/server_user" - android:id="@+id/label_server_user" - android:layout_centerVertical="true" - android:paddingBottom="8dp" - android:layout_alignParentStart="true" /> - - <EditText - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:hint="@string/server_user_hint" - android:id="@+id/server_user" - android:layout_marginStart="8dp" - android:layout_toEndOf="@+id/label_server_user" - android:layout_alignParentEnd="true" - android:inputType="textWebEmailAddress"/> - </RelativeLayout> - <RelativeLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:layout_gravity="center_vertical"> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/server_url" - android:paddingBottom="8dp" - android:id="@+id/label_server_url" - android:layout_centerVertical="true" - android:layout_alignParentStart="true" /> - - <EditText - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:hint="@string/server_url_hint" - android:id="@+id/server_url" - android:layout_marginStart="8dp" - android:layout_toEndOf="@+id/label_server_url" - android:layout_toStartOf="@+id/label_server_port" - android:inputType="textWebEmailAddress" - tools:ignore="TextFields" /> - - <TextView - android:id="@+id/label_server_port" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:layout_toStartOf="@+id/server_port" - android:paddingBottom="8dp" - android:text=":" - tools:ignore="HardcodedText" /> - - <EditText - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:hint="@string/server_port_hint" - android:id="@+id/server_port" - android:layout_alignParentEnd="true" - android:inputType="number"/> - - </RelativeLayout> - - <RelativeLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:layout_gravity="center_vertical"> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/server_path" - android:paddingBottom="8dp" - android:id="@+id/label_server_path" - android:layout_centerVertical="true" - android:layout_alignParentStart="true" /> - - <EditText - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:hint="@string/server_path_hint" - android:layout_marginStart="8dp" - android:id="@+id/server_path" - android:layout_toEndOf="@+id/label_server_path" - android:layout_alignParentEnd="true" - android:inputType="textWebEmailAddress"/> - </RelativeLayout> - - - <TextView - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:text="@string/server_resulting_url" - android:textStyle="bold" - style="@android:style/TextAppearance.Large" - android:gravity="start" - android:paddingBottom="6dp" - android:textColor="@color/blue_grey_500" - android:background="@drawable/bottom_line"/> - - <EditText - android:id="@+id/clone_uri" + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/label_server_protocol" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/server_protocol" + android:layout_margin="8dp" + app:layout_constraintTop_toBottomOf="@id/server_label" + app:layout_constraintStart_toStartOf="parent" /> + + <Spinner + android:id="@+id/clone_protocol" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="8dp" + app:layout_constraintTop_toBottomOf="@id/server_label" + app:layout_constraintStart_toEndOf="@id/label_server_protocol" /> + + <com.google.android.material.textfield.TextInputLayout + style="@style/TextInputLayoutBase" + android:id="@+id/server_user_layout" + android:hint="@string/server_user" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_margin="8dp" + app:hintEnabled="true" + app:layout_constraintTop_toBottomOf="@id/label_server_protocol"> + <com.google.android.material.textfield.TextInputEditText + android:id="@+id/server_user" android:layout_width="match_parent" android:layout_height="wrap_content" - android:hint="@string/repository_uri" - android:inputType="textWebEmailAddress" - tools:ignore="TextFields" /> + android:inputType="textWebEmailAddress" /> + </com.google.android.material.textfield.TextInputLayout> - <TextView + <com.google.android.material.textfield.TextInputLayout + style="@style/TextInputLayoutBase" + android:id="@+id/label_server_url" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_margin="8dp" + android:hint="@string/server_url" + app:hintEnabled="true" + app:layout_constraintTop_toBottomOf="@id/server_user_layout" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toStartOf="@id/label_server_port"> + + <com.google.android.material.textfield.TextInputEditText android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@drawable/red_rectangle" - android:textColor="@android:color/white" - android:visibility="gone" - android:id="@+id/warn_url"/> + android:id="@+id/server_url" + android:inputType="textWebEmailAddress" /> - <RelativeLayout + </com.google.android.material.textfield.TextInputLayout> + + <com.google.android.material.textfield.TextInputLayout + style="@style/TextInputLayoutBase" + android:id="@+id/label_server_port" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_margin="8dp" + android:hint="@string/server_port_hint" + app:hintEnabled="true" + app:layout_constraintStart_toEndOf="@id/label_server_url" + app:layout_constraintTop_toBottomOf="@id/server_user_layout" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintDimensionRatio="1:0.8"> + + <com.google.android.material.textfield.TextInputEditText + android:id="@+id/server_port" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="horizontal" - android:layout_gravity="center_vertical"> - - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/connection_mode" - android:id="@+id/label_connection_mode" - android:layout_centerVertical="true" - android:layout_alignParentStart="true" /> - - <Spinner - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:id="@+id/connection_mode" - android:layout_toEndOf="@+id/label_connection_mode" /> - </RelativeLayout> - - <Button - android:id="@+id/clone_button" - android:text="@string/clone_button" + android:inputType="number" /> + + </com.google.android.material.textfield.TextInputLayout> + + <com.google.android.material.textfield.TextInputLayout + style="@style/TextInputLayoutBase" + android:id="@+id/label_server_path" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_margin="8dp" + android:hint="@string/server_path" + app:hintEnabled="true" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/label_server_url"> + + <com.google.android.material.textfield.TextInputEditText + android:id="@+id/server_path" android:layout_width="match_parent" android:layout_height="wrap_content" - android:onClick="cloneRepository"/> - <Button - android:id="@+id/save_button" - android:text="@string/crypto_save" + android:inputType="textWebEmailAddress"/> + + </com.google.android.material.textfield.TextInputLayout> + + <com.google.android.material.textfield.TextInputLayout + style="@style/TextInputLayoutBase" + android:id="@+id/label_clone_uri" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:hint="@string/repository_uri" + android:editable="false" + android:layout_margin="8dp" + app:hintEnabled="true" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/label_server_path"> + + <com.google.android.material.textfield.TextInputEditText + android:id="@+id/clone_uri" android:layout_width="match_parent" android:layout_height="wrap_content" - android:onClick="saveConfiguration"/> - </LinearLayout> + android:inputType="textWebEmailAddress"/> -</ScrollView> + </com.google.android.material.textfield.TextInputLayout> + + <androidx.appcompat.widget.AppCompatTextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@drawable/red_rectangle" + android:textColor="@android:color/white" + android:visibility="gone" + android:id="@+id/warn_url" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/label_clone_uri"/> + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/label_connection_mode" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/connection_mode" + android:layout_margin="16dp" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/warn_url" /> + + <Spinner + android:id="@+id/connection_mode" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="16dp" + app:layout_constraintTop_toBottomOf="@id/warn_url" + app:layout_constraintStart_toEndOf="@id/label_connection_mode" /> + + <com.google.android.material.button.MaterialButton + style="@style/Widget.MaterialComponents.Button" + android:id="@+id/clone_button" + android:text="@string/clone_button" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:onClick="cloneRepository" + android:textColor="?android:attr/windowBackground" + android:layout_marginTop="8dp" + app:backgroundTint="?attr/colorSecondary" + app:layout_constraintTop_toBottomOf="@id/label_connection_mode" + app:layout_constraintStart_toStartOf="parent" /> + + <com.google.android.material.button.MaterialButton + style="@style/Widget.MaterialComponents.Button" + android:id="@+id/save_button" + android:text="@string/crypto_save" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:onClick="saveConfiguration" + android:textColor="?android:attr/windowBackground" + android:layout_marginTop="8dp" + app:backgroundTint="?attr/colorSecondary" + app:layout_constraintTop_toBottomOf="@id/label_connection_mode" + app:layout_constraintStart_toStartOf="parent" /> +</androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/activity_git_config.xml b/app/src/main/res/layout/activity_git_config.xml index 2283353b..bb2eac8b 100644 --- a/app/src/main/res/layout/activity_git_config.xml +++ b/app/src/main/res/layout/activity_git_config.xml @@ -1,143 +1,119 @@ <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" - android:id="@+id/scrollView2" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@android:color/white" + android:padding="@dimen/activity_horizontal_margin" + android:background="?android:attr/windowBackground" tools:context="com.zeapo.pwdstore.git.GitActivity" tools:layout_editor_absoluteX="0dp" tools:layout_editor_absoluteY="81dp"> - - <TextView - android:id="@+id/textView5" - style="@android:style/TextAppearance.Large" - android:layout_width="344dp" + <com.google.android.material.textfield.TextInputLayout + android:id="@+id/username_input_layout" + style="@style/TextInputLayoutBase" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginStart="8dp" - android:layout_marginTop="8dp" - android:background="@drawable/bottom_line" - android:gravity="start" - android:paddingBottom="6dp" - android:text="@string/git_config" - android:textColor="@color/blue_grey_500" - android:textStyle="bold" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" /> - - - <TextView - android:id="@+id/label_git_user_name" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginStart="8dp" - android:paddingBottom="8dp" - android:text="@string/git_user_name" - app:layout_constraintBaseline_toBaselineOf="@+id/git_user_name" - app:layout_constraintStart_toStartOf="parent" /> - - <EditText - android:id="@+id/git_user_name" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginEnd="8dp" - android:layout_marginStart="8dp" - android:layout_marginTop="8dp" + android:layout_margin="8dp" android:hint="@string/git_user_name_hint" - android:inputType="textWebEmailAddress" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toEndOf="@+id/label_git_user_name" - app:layout_constraintTop_toBottomOf="@+id/textView5" /> + app:hintEnabled="true" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintStart_toStartOf="parent" + tools:layout_editor_absoluteY="64dp"> + <com.google.android.material.textfield.TextInputEditText + android:id="@+id/git_user_name" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="textNoSuggestions|textVisiblePassword" /> - <TextView - android:id="@+id/label_git_user_email" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:paddingBottom="8dp" - android:text="@string/git_user_email" - app:layout_constraintBaseline_toBaselineOf="@+id/git_user_email" - app:layout_constraintEnd_toEndOf="@+id/label_git_user_name" - app:layout_constraintStart_toStartOf="@+id/label_git_user_name" /> + </com.google.android.material.textfield.TextInputLayout> - <EditText - android:id="@+id/git_user_email" - android:layout_width="0dp" + <com.google.android.material.textfield.TextInputLayout + style="@style/TextInputLayoutBase" + android:id="@+id/email_input_layout" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginEnd="8dp" - android:layout_marginTop="8dp" - android:hint="@string/git_user_email_hint" - android:inputType="textWebEmailAddress" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="@+id/git_user_name" - app:layout_constraintTop_toBottomOf="@+id/git_user_name" /> - - - <Button + android:layout_margin="8dp" + android:hint="@string/git_user_email" + app:hintEnabled="true" + app:layout_constraintTop_toBottomOf="@id/username_input_layout" + app:layout_constraintStart_toStartOf="parent"> + + <com.google.android.material.textfield.TextInputEditText + android:id="@+id/git_user_email" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="textEmailAddress" /> + + </com.google.android.material.textfield.TextInputLayout> + + <com.google.android.material.button.MaterialButton + style="@style/Widget.MaterialComponents.Button" android:id="@+id/save_button" - android:layout_width="0dp" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginEnd="8dp" - android:layout_marginTop="8dp" - android:onClick="applyGitConfigs" + android:layout_margin="8dp" android:text="@string/crypto_save" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintRight_toRightOf="parent" - app:layout_constraintTop_toBottomOf="@+id/git_user_email" /> + android:onClick="applyGitConfigs" + android:textColor="?android:attr/windowBackground" + app:backgroundTint="?attr/colorSecondary" + app:layout_constraintTop_toBottomOf="@id/email_input_layout" + app:layout_constraintEnd_toEndOf="parent"/> - <TextView - android:id="@+id/textView6" - style="@android:style/TextAppearance.Large" - android:layout_width="344dp" - android:layout_height="wrap_content" - android:layout_marginTop="8dp" - android:background="@drawable/bottom_line" - android:gravity="start" - android:paddingBottom="6dp" - android:text="@string/hackish_tools" - android:textColor="@color/blue_grey_500" + <androidx.appcompat.widget.AppCompatTextView + style="@style/TextAppearance.MaterialComponents.Headline5" android:textStyle="bold" - app:layout_constraintLeft_toLeftOf="parent" - app:layout_constraintRight_toRightOf="parent" - app:layout_constraintTop_toBottomOf="@+id/save_button" /> - - <Button - android:id="@+id/git_abort_rebase" - android:layout_width="0dp" + android:textSize="24sp" + android:id="@+id/git_tools_title" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginEnd="8dp" - android:layout_marginStart="8dp" - android:layout_marginTop="8dp" - android:onClick="abortRebase" - android:text="@string/abort_rebase" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintLeft_toLeftOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/textView7" /> + android:layout_margin="8dp" + android:text="@string/hackish_tools" + app:layout_constraintTop_toBottomOf="@id/save_button" + app:layout_constraintStart_toStartOf="parent" /> - <TextView - android:id="@+id/textView7" + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/commit_hash_label" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="8dp" - android:layout_marginTop="8dp" + android:layout_margin="8dp" android:text="@string/commit_hash" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/textView6" /> + app:layout_constraintTop_toBottomOf="@id/git_tools_title" + app:layout_constraintStart_toStartOf="parent"/> - <TextView + <androidx.appcompat.widget.AppCompatTextView android:id="@+id/git_commit_hash" - android:layout_width="0dp" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="16dp" - android:text="HASH" + android:layout_margin="8dp" android:textStyle="bold" - app:layout_constraintBaseline_toBaselineOf="@+id/textView7" - app:layout_constraintLeft_toLeftOf="parent" - app:layout_constraintRight_toRightOf="parent" - app:layout_constraintStart_toEndOf="@+id/textView7" - tools:ignore="HardcodedText" /> + app:layout_constraintTop_toBottomOf="@id/git_tools_title" + app:layout_constraintStart_toEndOf="@id/commit_hash_label" + tools:text="HASH"/> + <com.google.android.material.button.MaterialButton + style="@style/Widget.MaterialComponents.Button" + android:id="@+id/git_abort_rebase" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_margin="8dp" + android:text="@string/abort_rebase" + android:onClick="abortRebase" + android:textColor="?android:attr/windowBackground" + app:backgroundTint="?attr/colorSecondary" + app:layout_constraintTop_toBottomOf="@id/commit_hash_label" /> + + <com.google.android.material.button.MaterialButton + style="@style/Widget.MaterialComponents.Button" + android:id="@+id/git_reset_to_remote" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_margin="8dp" + android:text="@string/reset_to_remote" + android:onClick="resetToRemote" + android:textColor="?android:attr/windowBackground" + app:backgroundTint="?attr/colorSecondary" + app:layout_constraintTop_toBottomOf="@id/git_abort_rebase" /> </androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/activity_pwdstore.xml b/app/src/main/res/layout/activity_pwdstore.xml index dd30d3fc..e76b88a1 100644 --- a/app/src/main/res/layout/activity_pwdstore.xml +++ b/app/src/main/res/layout/activity_pwdstore.xml @@ -1,4 +1,4 @@ -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" +<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="match_parent" @@ -11,4 +11,4 @@ android:layout_height="match_parent" android:orientation="vertical"/> -</RelativeLayout> +</LinearLayout> diff --git a/app/src/main/res/layout/autofill_instructions.xml b/app/src/main/res/layout/autofill_instructions.xml index 333cd5fa..d75320d3 100644 --- a/app/src/main/res/layout/autofill_instructions.xml +++ b/app/src/main/res/layout/autofill_instructions.xml @@ -12,14 +12,13 @@ android:paddingRight="24dp" android:paddingTop="20dp"> - <TextView - android:id="@+id/textView" + <androidx.appcompat.widget.AppCompatTextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/pref_autofill_enable_msg" android:textSize="16sp" /> - <ImageView + <androidx.appcompat.widget.AppCompatImageView android:id="@+id/imageView" android:layout_width="match_parent" android:layout_height="wrap_content" @@ -29,8 +28,7 @@ android:src="@drawable/autofill_ins_1" android:contentDescription="@string/autofill_ins_1_hint" /> - <ImageView - android:id="@+id/imageView2" + <androidx.appcompat.widget.AppCompatImageView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="8dp" @@ -38,15 +36,13 @@ android:src="@drawable/autofill_ins_2" android:contentDescription="@string/autofill_ins_2_hint" /> - <TextView - android:id="@+id/textView3" + <androidx.appcompat.widget.AppCompatTextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/pref_autofill_enable_msg2" android:textSize="16sp" /> - <ImageView - android:id="@+id/imageView3" + <androidx.appcompat.widget.AppCompatImageView android:layout_width="match_parent" android:layout_height="114dp" android:layout_marginBottom="8dp" @@ -54,8 +50,7 @@ android:src="@drawable/autofill_ins_3" android:contentDescription="@string/autofill_ins_3_hint" /> - <TextView - android:id="@+id/textView4" + <androidx.appcompat.widget.AppCompatTextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/pref_autofill_enable_msg3" diff --git a/app/src/main/res/layout/autofill_recycler_view.xml b/app/src/main/res/layout/autofill_recycler_view.xml index c0bbacdb..30b72c04 100644 --- a/app/src/main/res/layout/autofill_recycler_view.xml +++ b/app/src/main/res/layout/autofill_recycler_view.xml @@ -27,8 +27,8 @@ android:layout_gravity="bottom|end" app:elevation="6dp" app:pressedTranslationZ="12dp" - app:backgroundTint="@color/blue_grey_500" - app:rippleColor="@color/blue_grey_50" + app:backgroundTint="?attr/colorSecondary" + app:rippleColor="?attr/colorSecondary" app:borderWidth="0dp" android:layout_margin="@dimen/fab_compat_margin" android:layout_alignParentBottom="true" diff --git a/app/src/main/res/layout/autofill_row_layout.xml b/app/src/main/res/layout/autofill_row_layout.xml index e07a73d3..12354077 100644 --- a/app/src/main/res/layout/autofill_row_layout.xml +++ b/app/src/main/res/layout/autofill_row_layout.xml @@ -1,21 +1,14 @@ <?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" +<LinearLayout android:layout_width="match_parent" android:layout_height="64dp" - android:background="@drawable/autofill_row_background" - android:orientation="vertical"> + android:background="?android:attr/selectableItemBackground" + android:gravity="center_vertical" + android:orientation="horizontal" + android:paddingLeft="@dimen/activity_horizontal_margin" + android:paddingRight="@dimen/activity_horizontal_margin" + xmlns:android="http://schemas.android.com/apk/res/android"> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="?android:attr/selectableItemBackground" - android:gravity="center_vertical" - android:orientation="horizontal" - android:paddingLeft="@dimen/activity_horizontal_margin" - android:paddingRight="@dimen/activity_horizontal_margin"> - - <ImageView + <androidx.appcompat.widget.AppCompatImageView android:id="@+id/app_icon" android:layout_width="48dp" android:layout_height="48dp" @@ -24,24 +17,21 @@ <LinearLayout android:layout_width="wrap_content" android:layout_height="match_parent" - android:layout_marginLeft="8dp" + android:layout_marginStart="8dp" android:gravity="center_vertical" - android:orientation="vertical" - tools:ignore="RtlHardcoded"> + android:orientation="vertical" > - <TextView + <androidx.appcompat.widget.AppCompatTextView android:id="@+id/app_name" android:layout_width="wrap_content" android:layout_height="wrap_content" /> - <TextView + <androidx.appcompat.widget.AppCompatTextView android:id="@+id/secondary_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceSmall" - android:textColor="@color/grey_600" /> + android:textColor="?android:attr/textColor" /> </LinearLayout> - </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 4536042a..17ab55ed 100644 --- a/app/src/main/res/layout/decrypt_layout.xml +++ b/app/src/main/res/layout/decrypt_layout.xml @@ -3,228 +3,251 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/background" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:background="?android:attr/windowBackground" android:orientation="vertical" tools:context="com.zeapo.pwdstore.crypto.PgpActivity"> - <LinearLayout + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" android:padding="16dp"> - <LinearLayout - android:layout_width="match_parent" + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/crypto_password_category_decrypt" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:orientation="vertical"> - - <TextView - android:id="@+id/crypto_password_category_decrypt" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:layout_marginStart="16dp" - android:textColor="@color/grey_500" - android:textIsSelectable="false" - android:textSize="18sp" - tools:text="CATEGORY HERE" /> - - <TextView - android:id="@+id/crypto_password_file" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginStart="@dimen/activity_horizontal_margin" - android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium" - android:textColor="@color/accent" - android:textSize="24sp" - android:textStyle="bold" - tools:text="PASSWORD FILE NAME HERE" /> - - <TextView - android:id="@+id/crypto_password_last_changed" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:layout_marginStart="16dp" - android:textColor="@color/grey_500" - android:textIsSelectable="false" - android:textSize="18sp" - tools:text="LAST CHANGED HERE" /> - </LinearLayout> - - <ImageView + android:layout_gravity="center_vertical" + android:layout_marginStart="16dp" + android:textColor="?android:attr/textColor" + android:textIsSelectable="false" + android:textSize="18sp" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + tools:text="CATEGORY HERE" /> + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/crypto_password_file" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/activity_horizontal_margin" + android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium" + android:textColor="?attr/colorSecondary" + android:textSize="24sp" + android:textStyle="bold" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/crypto_password_category_decrypt" + tools:text="PASSWORD FILE NAME HERE" /> + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/crypto_password_last_changed" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:layout_marginStart="16dp" + android:textColor="?android:attr/textColor" + android:textIsSelectable="false" + android:textSize="18sp" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/crypto_password_file" + tools:text="LAST CHANGED HERE" /> + + + <androidx.appcompat.widget.AppCompatImageView + android:id="@+id/divider" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="16dp" android:layout_marginTop="16dp" android:src="@drawable/divider" + app:layout_constraintTop_toBottomOf="@id/crypto_password_last_changed" tools:ignore="ContentDescription" /> - <LinearLayout + <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/crypto_container_decrypt" - android:layout_width="fill_parent" + android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/activity_vertical_margin" - android:orientation="vertical" - android:visibility="invisible"> + android:visibility="invisible" + tools:visibility="visible" + app:layout_constraintTop_toBottomOf="@id/divider"> - <GridLayout - android:id="@+id/crypto_password_show_layout" + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/crypto_password_show_label" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/password" + android:textColor="?android:attr/textColor" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + android:textStyle="bold" /> + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/crypto_password_show" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_gravity="fill" + android:gravity="bottom" + android:textColor="?android:attr/textColor" + app:layout_constraintStart_toEndOf="@id/crypto_password_show_label" + app:layout_constraintBaseline_toBaselineOf="@id/crypto_password_show_label" + android:typeface="monospace" /> + + <ProgressBar + android:id="@+id/pbLoading" + style="?android:attr/progressBarStyleHorizontal" android:layout_width="match_parent" - android:layout_height="wrap_content"> - - <TextView - android:id="@+id/crypto_password_show_label" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_column="0" - android:layout_row="0" - android:text="@string/password" - android:textColor="@android:color/black" - android:textStyle="bold" /> - - <TextView - android:id="@+id/crypto_password_show" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_column="2" - android:layout_gravity="fill" - android:gravity="bottom" - android:layout_row="0" - android:textColor="@android:color/black" - android:typeface="monospace" /> - - <ProgressBar - android:id="@+id/pbLoading" - style="?android:attr/progressBarStyleHorizontal" - android:layout_width="match_parent" - android:layout_height="8dp" - android:layout_column="0" - android:layout_columnSpan="3" - android:layout_marginBottom="8dp" - android:layout_marginTop="8dp" - android:layout_row="1" /> - - <Button - android:id="@+id/crypto_password_toggle_show" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_column="0" - android:layout_columnSpan="3" - android:layout_row="2" - android:text="@string/show_password" /> - </GridLayout> - - - <RelativeLayout - android:id="@+id/crypto_extra_show_layout" + android:layout_height="8dp" + android:layout_marginBottom="8dp" + android:visibility="invisible" + android:layout_marginTop="8dp" + app:layout_constraintTop_toBottomOf="@id/crypto_password_show_label"/> + + <com.google.android.material.button.MaterialButton + style="@style/Widget.MaterialComponents.Button" + android:id="@+id/crypto_password_toggle_show" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textColor="?android:attr/windowBackground" + android:text="@string/show_password" + android:layout_marginTop="8dp" + app:layout_constraintTop_toBottomOf="@id/crypto_password_show_label" + app:backgroundTint="?attr/colorSecondary"/> + + </androidx.constraintlayout.widget.ConstraintLayout> + + <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/crypto_extra_show_layout" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:visibility="invisible" + app:layout_constraintTop_toBottomOf="@id/crypto_container_decrypt" + tools:visibility="visible"> + + <androidx.appcompat.widget.AppCompatImageButton + android:id="@+id/crypto_copy_username" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentEnd="true" + android:layout_alignParentTop="true" + android:background="?android:attr/windowBackground" + android:contentDescription="@string/copy_username" + android:src="@drawable/ic_content_copy" + android:visibility="invisible" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintEnd_toEndOf="parent" + tools:visibility="visible"/> + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/crypto_username_show_label" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:layout_alignParentTop="true" + android:layout_toStartOf="@id/crypto_copy_username" + android:text="@string/username" + android:textColor="?android:attr/textColor" + android:textStyle="bold" + android:visibility="invisible" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + tools:visibility="visible"/> + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/crypto_username_show" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:layout_below="@id/crypto_username_show_label" + android:layout_toStartOf="@id/crypto_copy_username" + android:textColor="?android:attr/textColor" + android:textIsSelectable="true" + android:typeface="monospace" + android:visibility="invisible" + app:layout_constraintTop_toBottomOf="@id/crypto_username_show_label" + app:layout_constraintStart_toStartOf="parent" + tools:visibility="visible"/> + + <androidx.appcompat.widget.AppCompatImageView + android:id="@+id/crypto_copy_otp" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentEnd="true" + android:layout_below="@id/crypto_username_show" + android:background="?android:attr/windowBackground" + android:contentDescription="@string/copy_otp" + android:src="@drawable/ic_content_copy" + android:visibility="invisible" + app:layout_constraintTop_toTopOf="@id/crypto_otp_show_label" + app:layout_constraintEnd_toEndOf="parent" + tools:visibility="visible"/> + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/crypto_otp_show_label" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:layout_below="@id/crypto_username_show" + android:layout_toStartOf="@id/crypto_copy_otp" + android:text="@string/otp" + android:textColor="?android:attr/textColor" + app:layout_constraintTop_toBottomOf="@id/crypto_username_show" + app:layout_constraintStart_toStartOf="parent" + android:textStyle="bold" /> + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/crypto_otp_show" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:layout_below="@id/crypto_otp_show_label" + android:layout_toStartOf="@id/crypto_copy_otp" + android:textColor="?android:attr/textColor" + android:textIsSelectable="true" + app:layout_constraintTop_toBottomOf="@id/crypto_otp_show_label" + android:typeface="monospace" /> + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/crypto_extra_show_label" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:layout_below="@id/crypto_otp_show" + android:text="@string/extra_content" + android:textColor="?android:attr/textColor" + app:layout_constraintTop_toBottomOf="@id/crypto_otp_show" + app:layout_constraintStart_toStartOf="parent" + android:textStyle="bold" /> + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/crypto_extra_show" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:layout_below="@id/crypto_extra_show_label" + android:textColor="?android:attr/textColor" + android:textIsSelectable="true" + app:layout_constraintTop_toBottomOf="@id/crypto_extra_show_label" + android:typeface="monospace" /> + + <ToggleButton + android:id="@+id/crypto_extra_toggle_show" + style="@style/Widget.MaterialComponents.Button" android:layout_width="match_parent" android:layout_height="wrap_content" - android:visibility="invisible"> - - <ImageButton - android:id="@+id/crypto_copy_username" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentEnd="true" - android:layout_alignParentTop="true" - android:background="@color/background" - android:contentDescription="@string/copy_username" - android:src="@drawable/ic_content_copy" - android:visibility="invisible" /> - - <TextView - android:id="@+id/crypto_username_show_label" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_alignParentTop="true" - android:layout_toStartOf="@id/crypto_copy_username" - android:text="@string/username" - android:textColor="@android:color/black" - android:textStyle="bold" - android:visibility="invisible" /> - - <TextView - android:id="@+id/crypto_username_show" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_below="@id/crypto_username_show_label" - android:layout_toStartOf="@id/crypto_copy_username" - android:textColor="@android:color/black" - android:textIsSelectable="true" - android:typeface="monospace" - android:visibility="invisible" /> - - <ImageButton - android:id="@+id/crypto_copy_otp" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentEnd="true" - android:layout_below="@id/crypto_username_show" - android:background="@color/background" - android:contentDescription="@string/copy_otp" - android:src="@drawable/ic_content_copy" - android:visibility="invisible" /> - - <TextView - android:id="@+id/crypto_otp_show_label" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_below="@id/crypto_username_show" - android:layout_toStartOf="@id/crypto_copy_otp" - android:text="@string/otp" - android:textColor="@android:color/black" - android:textStyle="bold" /> - - <TextView - android:id="@+id/crypto_otp_show" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_below="@id/crypto_otp_show_label" - android:layout_toStartOf="@id/crypto_copy_otp" - android:textColor="@android:color/black" - android:textIsSelectable="true" - android:typeface="monospace" /> - - <TextView - android:id="@+id/crypto_extra_show_label" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_below="@id/crypto_otp_show" - android:text="@string/extra_content" - android:textColor="@android:color/black" - android:textStyle="bold" /> - - <TextView - android:id="@+id/crypto_extra_show" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_below="@id/crypto_extra_show_label" - android:textColor="@android:color/black" - android:textIsSelectable="true" - android:typeface="monospace" /> - - <ToggleButton - android:id="@+id/crypto_extra_toggle_show" - style="@style/Widget.AppCompat.Button" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_below="@id/crypto_extra_show" - android:layout_alignParentStart="true" - android:checked="false" - android:paddingTop="8dp" - android:textOff="@string/show_extra" - android:textOn="@string/hide_extra" /> - - </RelativeLayout> - </LinearLayout> - - </LinearLayout> + android:layout_below="@id/crypto_extra_show" + android:layout_alignParentStart="true" + android:checked="false" + android:paddingTop="8dp" + android:textColor="?android:attr/windowBackground" + android:textOff="@string/show_extra" + android:textOn="@string/hide_extra" + app:layout_constraintTop_toBottomOf="@id/crypto_extra_show" + android:backgroundTint="?attr/colorSecondary"/> + + </androidx.constraintlayout.widget.ConstraintLayout> + + </androidx.constraintlayout.widget.ConstraintLayout> </ScrollView> diff --git a/app/src/main/res/layout/encrypt_layout.xml b/app/src/main/res/layout/encrypt_layout.xml index f84792e8..41fa78ee 100644 --- a/app/src/main/res/layout/encrypt_layout.xml +++ b/app/src/main/res/layout/encrypt_layout.xml @@ -1,89 +1,87 @@ <?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<androidx.constraintlayout.widget.ConstraintLayout 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" - android:background="@color/background" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:background="?android:attr/windowBackground" android:orientation="vertical" android:padding="@dimen/activity_horizontal_margin" tools:context="com.zeapo.pwdstore.crypto.PgpActivity"> - <ScrollView - android:id="@+id/crypto_scroll_view" - android:layout_width="fill_parent" - android:layout_height="0dp" - android:layout_marginBottom="@dimen/activity_vertical_margin" - android:layout_marginTop="@dimen/activity_vertical_margin" - android:layout_weight="1"> + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/crypto_password_category" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/activity_horizontal_margin" + android:textColor="?android:attr/textColor" + android:textIsSelectable="false" + android:textSize="18sp" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + tools:text="CATEGORY HERE" /> - <LinearLayout + <com.google.android.material.textfield.TextInputLayout + style="@style/TextInputLayoutBase" + android:id="@+id/name_input_layout" + android:layout_gravity="center_vertical" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_margin="8dp" + android:hint="@string/crypto_name_hint" + app:hintEnabled="true" + app:layout_constraintTop_toBottomOf="@id/crypto_password_category" + app:layout_constraintStart_toStartOf="parent"> + <com.google.android.material.textfield.TextInputEditText + android:id="@+id/crypto_password_file_edit" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical"> + android:layout_height="wrap_content"/> + </com.google.android.material.textfield.TextInputLayout> - <TextView - android:id="@+id/crypto_password_category" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:layout_marginStart="@dimen/activity_horizontal_margin" - android:textColor="@color/grey_500" - android:textIsSelectable="false" - android:textSize="18sp" - tools:text="CATEGORY HERE" /> - - <EditText - android:id="@+id/crypto_password_file_edit" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:hint="@string/crypto_name_hint" - android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium" - android:textColor="@color/accent" - android:textSize="24sp" - tools:ignore="TextFields" /> - - <TextView - android:id="@+id/textView2" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/crypto_pass_label" - android:textStyle="bold" /> - - <EditText - android:id="@+id/crypto_password_edit" - android:layout_width="match_parent" - android:hint="@string/crypto_password_edit_hint" - android:layout_height="0dp" - android:layout_weight="1" - android:inputType="textVisiblePassword" - android:typeface="monospace" /> - - <Button - android:id="@+id/generate_password" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="end" - android:text="@string/pwd_generate_button" /> + <com.google.android.material.textfield.TextInputLayout + style="@style/TextInputLayoutBase" + android:id="@+id/password_input_layout" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_margin="8dp" + android:hint="@string/crypto_pass_label" + app:hintEnabled="true" + app:layout_constraintTop_toBottomOf="@id/name_input_layout" + app:layout_constraintStart_toStartOf="parent"> + <com.google.android.material.textfield.TextInputEditText + android:id="@+id/crypto_password_edit" + android:layout_width="match_parent" + android:layout_height="wrap_content"/> + </com.google.android.material.textfield.TextInputLayout> - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="8dp" - android:text="@string/crypto_extra_label" - android:textStyle="bold" /> + <com.google.android.material.button.MaterialButton + style="@style/Widget.MaterialComponents.Button" + android:id="@+id/generate_password" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="8dp" + android:text="@string/pwd_generate_button" + android:textColor="?android:attr/windowBackground" + app:backgroundTint="?attr/colorSecondary" + app:layout_constraintTop_toBottomOf="@id/password_input_layout" + app:layout_constraintEnd_toEndOf="parent"/> - <EditText - android:id="@+id/crypto_extra_edit" - android:layout_width="match_parent" - android:layout_height="fill_parent" - android:hint="@string/crypto_extra_edit_hint" - android:enabled="true" - android:inputType="textMultiLine|textVisiblePassword" - android:typeface="monospace" - android:visibility="visible" /> - </LinearLayout> + <com.google.android.material.textfield.TextInputLayout + style="@style/TextInputLayoutBase" + android:id="@+id/extra_input_layout" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_margin="8dp" + android:hint="@string/crypto_extra_label" + app:hintEnabled="true" + app:layout_constraintTop_toBottomOf="@id/generate_password" + app:layout_constraintStart_toStartOf="parent"> - </ScrollView> + <com.google.android.material.textfield.TextInputEditText + android:id="@+id/crypto_extra_edit" + android:inputType="textMultiLine|textVisiblePassword" + android:layout_width="match_parent" + android:layout_height="wrap_content"/> -</LinearLayout>
\ No newline at end of file + </com.google.android.material.textfield.TextInputLayout> +</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/fragment_autofill.xml b/app/src/main/res/layout/fragment_autofill.xml index 7f09f0cb..d780e6f6 100644 --- a/app/src/main/res/layout/fragment_autofill.xml +++ b/app/src/main/res/layout/fragment_autofill.xml @@ -14,15 +14,13 @@ <com.google.android.material.textfield.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content" - app:hintTextAppearance="@style/TextAppearance.AppCompat"> - - <EditText + android:hint="URL" + app:hintEnabled="true"> + <com.google.android.material.textfield.TextInputEditText android:id="@+id/webURL" android:layout_width="match_parent" android:layout_height="wrap_content" - android:hint="URL" - android:inputType="textUri" - tools:ignore="HardcodedText" /> + android:inputType="textUri"/> </com.google.android.material.textfield.TextInputLayout> <RadioGroup @@ -61,13 +59,15 @@ android:layout_gravity="center_horizontal" android:layout_weight="1"/> - <Button - style="?android:attr/buttonStyleSmall" + <com.google.android.material.button.MaterialButton + style="@style/Widget.MaterialComponents.Button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="+" android:id="@+id/matchButton" android:layout_gravity="center_horizontal" + android:textColor="?android:attr/windowBackground" + app:backgroundTint="?attr/colorSecondary" tools:ignore="HardcodedText" /> <RadioButton diff --git a/app/src/main/res/layout/fragment_pwgen.xml b/app/src/main/res/layout/fragment_pwgen.xml index eab23f7c..df01c62e 100644 --- a/app/src/main/res/layout/fragment_pwgen.xml +++ b/app/src/main/res/layout/fragment_pwgen.xml @@ -13,7 +13,7 @@ android:paddingTop="20dp" tools:context=".MainActivityFragment"> - <TextView + <androidx.appcompat.widget.AppCompatTextView android:id="@+id/passwordText" android:layout_width="match_parent" android:layout_height="wrap_content" @@ -34,8 +34,7 @@ android:layout_weight="1" android:orientation="vertical"> - <TextView - android:id="@+id/include" + <androidx.appcompat.widget.AppCompatTextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="8dp" @@ -75,7 +74,7 @@ android:layout_weight="1" android:orientation="vertical"> - <TextView + <androidx.appcompat.widget.AppCompatTextView android:id="@+id/length" android:layout_width="wrap_content" android:layout_height="wrap_content" 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 f9b3b469..78ece084 100644 --- a/app/src/main/res/layout/fragment_show_ssh_key.xml +++ b/app/src/main/res/layout/fragment_show_ssh_key.xml @@ -12,14 +12,13 @@ android:paddingRight="24dp" android:paddingTop="20dp"> - <TextView + <androidx.appcompat.widget.AppCompatTextView android:id="@+id/public_key" android:layout_width="match_parent" android:layout_height="wrap_content" android:textIsSelectable="true" /> - <TextView - android:id="@+id/public_key_tip" + <androidx.appcompat.widget.AppCompatTextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/ssh_keygen_tip" diff --git a/app/src/main/res/layout/fragment_ssh_keygen.xml b/app/src/main/res/layout/fragment_ssh_keygen.xml index 12961292..adfeb5e0 100644 --- a/app/src/main/res/layout/fragment_ssh_keygen.xml +++ b/app/src/main/res/layout/fragment_ssh_keygen.xml @@ -11,8 +11,7 @@ android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin"> - <TextView - android:id="@+id/label_length" + <androidx.appcompat.widget.AppCompatTextView android:layout_width="wrap_content" android:layout_height="48dp" android:gravity="center_vertical" @@ -25,16 +24,17 @@ android:spinnerMode="dropdown" /> <com.google.android.material.textfield.TextInputLayout + style="@style/TextInputLayoutBase" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" - app:hintTextAppearance="@style/TextAppearance.AppCompat"> + android:hint="@string/ssh_keygen_passphrase" + app:hintEnabled="true"> - <EditText + <com.google.android.material.textfield.TextInputEditText android:id="@+id/passphrase" android:layout_width="match_parent" android:layout_height="wrap_content" - android:hint="@string/ssh_keygen_passphrase" android:importantForAccessibility="no" android:inputType="textPassword" /> </com.google.android.material.textfield.TextInputLayout> @@ -48,21 +48,21 @@ android:text="@string/ssh_keygen_show_passphrase" /> <com.google.android.material.textfield.TextInputLayout + style="@style/TextInputLayoutBase" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" - app:hintTextAppearance="@style/TextAppearance.AppCompat"> + android:hint="@string/ssh_keygen_comment" + app:hintEnabled="true"> - <EditText + <com.google.android.material.textfield.TextInputEditText android:id="@+id/comment" android:layout_width="match_parent" android:layout_height="wrap_content" - android:hint="@string/ssh_keygen_comment" android:inputType="text" /> </com.google.android.material.textfield.TextInputLayout> <Button - android:id="@+id/generate_ssh_key" 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 7d9341ba..cef35e1f 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 @@ -2,7 +2,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/blue_grey_500" + android:background="?attr/colorPrimary" android:orientation="vertical" tools:context="com.zeapo.pwdstore.PasswordStore"> @@ -11,7 +11,7 @@ android:layout_height="0dp" android:layout_weight="1"> - <ImageView + <androidx.appcompat.widget.AppCompatImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/imageView" @@ -21,7 +21,7 @@ android:layout_centerVertical="true" android:layout_centerHorizontal="true" /> - <TextView + <androidx.appcompat.widget.AppCompatTextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceLarge" @@ -32,7 +32,6 @@ android:textStyle="bold"/> <Button - android:id="@+id/main_settings_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="openSettings" @@ -48,20 +47,19 @@ </RelativeLayout> <RelativeLayout - android:id="@+id/myRectangleView" android:layout_width="match_parent" android:layout_height="48dp" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" - android:background="@android:color/white"> + android:background="?android:attr/windowBackground"> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" style="?android:attr/borderlessButtonStyle" + android:backgroundTint="?android:attr/windowBackground" android:onClick="createNewRepository" android:text="@string/initialize" - android:id="@+id/button" android:layout_alignTop="@+id/main_clone_button" android:layout_alignParentStart="true" android:textSize="12sp" /> @@ -70,7 +68,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" style="?android:attr/borderlessButtonStyle" - android:textColor="@color/teal_A700" + android:backgroundTint="?android:attr/windowBackground" android:onClick="cloneExistingRepository" android:text="@string/clone" android:layout_alignParentBottom="true" diff --git a/app/src/main/res/layout/git_passphrase_layout.xml b/app/src/main/res/layout/git_passphrase_layout.xml index fb0c0514..6fb4ee13 100644 --- a/app/src/main/res/layout/git_passphrase_layout.xml +++ b/app/src/main/res/layout/git_passphrase_layout.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" - android:id="@+id/linearLayout" android:layout_width="match_parent" android:layout_height="match_parent"> diff --git a/app/src/main/res/layout/password_recycler_view.xml b/app/src/main/res/layout/password_recycler_view.xml index d10db5fc..5e87351b 100644 --- a/app/src/main/res/layout/password_recycler_view.xml +++ b/app/src/main/res/layout/password_recycler_view.xml @@ -21,8 +21,8 @@ android:layout_gravity="bottom|end" app:elevation="6dp" app:pressedTranslationZ="12dp" - app:backgroundTint="@color/accent" - app:rippleColor="@color/blue_grey_50" + app:backgroundTint="?attr/colorSecondary" + app:rippleColor="?attr/colorSecondary" app:borderWidth="0dp" android:layout_margin="@dimen/fab_compat_margin" android:layout_alignParentBottom="true" diff --git a/app/src/main/res/layout/password_row_layout.xml b/app/src/main/res/layout/password_row_layout.xml index 66616cc3..71ad8cf4 100644 --- a/app/src/main/res/layout/password_row_layout.xml +++ b/app/src/main/res/layout/password_row_layout.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<com.zeapo.pwdstore.widget.MultiselectableLinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?android:attr/activatedBackgroundIndicator"> + android:background="@drawable/password_row_background"> <LinearLayout android:layout_width="match_parent" @@ -15,7 +15,7 @@ android:paddingRight="16dp" android:gravity="start"> - <ImageView + <androidx.appcompat.widget.AppCompatImageView android:id="@+id/type_image" android:layout_width="80dp" android:layout_height="32dp" @@ -24,7 +24,7 @@ android:alpha="0.5" android:contentDescription="@string/folder_icon_hint" android:paddingEnd="8dp" - android:src="@drawable/ic_folder_grey600_24dp" + android:src="@drawable/ic_folder_tinted_24dp" tools:ignore="RtlSymmetry" /> <LinearLayout @@ -34,24 +34,24 @@ android:layout_gravity="bottom" android:orientation="vertical"> - <TextView + <androidx.appcompat.widget.AppCompatTextView android:id="@+id/type" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ellipsize="start" android:singleLine="true" android:text="TYPE" - android:textColor="@color/grey_500" + android:textColor="?android:attr/textColor" android:textSize="14sp" tools:ignore="HardcodedText" /> - <TextView + <androidx.appcompat.widget.AppCompatTextView android:id="@+id/label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom" android:text="FILE_NAME" - android:textColor="@android:color/black" + android:textColor="?android:attr/textColor" android:textSize="18sp" tools:ignore="HardcodedText" /> @@ -59,4 +59,4 @@ </LinearLayout> -</LinearLayout>
\ No newline at end of file +</com.zeapo.pwdstore.widget.MultiselectableLinearLayout>
\ No newline at end of file |