aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res/layout
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2020-01-28 01:49:37 +0530
committerGitHub <noreply@github.com>2020-01-28 01:49:37 +0530
commitf295e97de6a9b7005e3fd6425296a5cd9d37af6b (patch)
treeee8dae97a03bf07f0890869429376df1adba8669 /app/src/main/res/layout
parentab5aebeda3388ec776c34130cf9039ae4f623562 (diff)
Allow creating folders (#623)
* Introduce EmitExpandableTransformationBehaviour * Implement expand transition * More folder work * Add icons and tweak layout clipping Rishi again with the icon rescue * Theming rework * Dont set tag * Update list and commit after creating folder * Fix theme issues * Add dialog title * Fix hint text color * Remove commit method * Cleanup * Update CHANGELOG Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com> Co-authored-by: Aditya Wasan <adityawasan55@gmail.com>
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r--app/src/main/res/layout/folder_creation_dialog_fragment.xml33
-rw-r--r--app/src/main/res/layout/password_recycler_view.xml62
-rw-r--r--app/src/main/res/layout/password_row_layout.xml1
3 files changed, 80 insertions, 16 deletions
diff --git a/app/src/main/res/layout/folder_creation_dialog_fragment.xml b/app/src/main/res/layout/folder_creation_dialog_fragment.xml
new file mode 100644
index 00000000..9d5dfda2
--- /dev/null
+++ b/app/src/main/res/layout/folder_creation_dialog_fragment.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+ 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"
+ android:orientation="vertical"
+ android:padding="16dp">
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/title_create_folder"
+ android:textColor="@color/color_control_normal"
+ android:textAppearance="@style/TextAppearance.AppCompat.SearchResult.Title"/>
+
+ <com.google.android.material.textfield.TextInputLayout
+ style="@style/TextInputLayoutBase"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="16dp"
+ android:hint="@string/crypto_name_hint"
+ app:hintTextColor="@color/color_control_normal"
+ app:hintEnabled="true">
+
+ <com.google.android.material.textfield.TextInputEditText
+ android:id="@+id/folder_name_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:inputType="textNoSuggestions|textVisiblePassword"/>
+
+ </com.google.android.material.textfield.TextInputLayout>
+</LinearLayout>
diff --git a/app/src/main/res/layout/password_recycler_view.xml b/app/src/main/res/layout/password_recycler_view.xml
index 07596335..f58543ac 100644
--- a/app/src/main/res/layout/password_recycler_view.xml
+++ b/app/src/main/res/layout/password_recycler_view.xml
@@ -1,11 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- tools:context="com.zeapo.pwdstore.PasswordFragment">
+<androidx.coordinatorlayout.widget.CoordinatorLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:clipChildren="false"
+ android:clipToPadding="false"
+ tools:context="com.zeapo.pwdstore.PasswordFragment">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/pass_recycler"
@@ -13,7 +16,39 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:listitem="@layout/password_row_layout"
- tools:itemCount="20"/>
+ tools:itemCount="20" />
+
+ <LinearLayout
+ android:id="@+id/create_options"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="top|center_horizontal"
+ android:layout_marginBottom="16dp"
+ android:orientation="vertical"
+ android:visibility="invisible"
+ android:clipChildren="false"
+ android:clipToPadding="false"
+ app:layout_anchor="@id/fab"
+ app:layout_anchorGravity="top|center_horizontal"
+ app:layout_behavior="com.zeapo.pwdstore.widget.fab.EmitExpandableTransformationBehavior"
+ tools:visibility="visible">
+
+ <com.google.android.material.floatingactionbutton.FloatingActionButton
+ android:id="@+id/create_password"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/fab_margin"
+ app:fabSize="mini"
+ app:srcCompat="@drawable/ic_action_new_password" />
+
+ <com.google.android.material.floatingactionbutton.FloatingActionButton
+ android:id="@+id/create_folder"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/fab_margin"
+ app:fabSize="mini"
+ app:srcCompat="@drawable/ic_action_new_folder" />
+ </LinearLayout>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
@@ -21,12 +56,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
- app:elevation="6dp"
- app:pressedTranslationZ="12dp"
- app:backgroundTint="?attr/colorSecondary"
- app:rippleColor="?attr/colorSecondary"
- app:borderWidth="0dp"
android:layout_margin="@dimen/fab_compat_margin"
android:layout_alignParentBottom="true"
- android:layout_alignParentEnd="true"/>
-</RelativeLayout>
+ android:layout_alignParentEnd="true"
+ app:backgroundTint="?attr/colorSecondary"
+ app:rippleColor="?attr/colorSecondary" />
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
diff --git a/app/src/main/res/layout/password_row_layout.xml b/app/src/main/res/layout/password_row_layout.xml
index 4339e019..0b7112b6 100644
--- a/app/src/main/res/layout/password_row_layout.xml
+++ b/app/src/main/res/layout/password_row_layout.xml
@@ -25,7 +25,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
- android:textColor="?android:attr/textColor"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/type_image"