Merge pull request #42 from yogeshpaliyal/material_you

Add with Material You Theme
This commit is contained in:
Yogesh Choudhary Paliyal
2021-10-31 23:05:35 +05:30
committed by GitHub
18 changed files with 271 additions and 247 deletions
+10 -3
View File
@@ -4,15 +4,22 @@
<option name="filePathToZoomLevelMap">
<map>
<entry key="../../../../layout/custom_preview.xml" value="0.20833333333333334" />
<entry key="..\:/Android Studio/My Projects/KeyPass/app/src/main/res/layout/activity_generate_password.xml" value="0.23229166666666667" />
<entry key="..\:/Users/paliy/StudioProjects/KeyPass/app/src/main/res/drawable/ic_twotone_content_copy_24.xml" value="0.10989583333333333" />
<entry key="..\:/Users/paliy/StudioProjects/KeyPass/app/src/main/res/drawable/ic_undraw_empty_street_sfxm.xml" value="0.21614583333333334" />
<entry key="..\:/Users/paliy/StudioProjects/KeyPass/app/src/main/res/drawable/nav_divider_top.xml" value="0.21614583333333334" />
<entry key="..\:/Users/paliy/StudioProjects/KeyPass/app/src/main/res/layout/activity_add_totpactivity.xml" value="0.16485507246376813" />
<entry key="..\:/Users/paliy/StudioProjects/KeyPass/app/src/main/res/layout/activity_dashboard.xml" value="0.2" />
<entry key="..\:/Users/paliy/StudioProjects/KeyPass/app/src/main/res/layout/activity_scanner.xml" value="0.10416666666666667" />
<entry key="..\:/Users/paliy/StudioProjects/KeyPass/app/src/main/res/layout/fragment_bottom_nav_drawer.xml" value="0.2" />
<entry key="..\:/Users/paliy/StudioProjects/KeyPass/app/src/main/res/layout/fragment_detail.xml" value="0.1403985507246377" />
<entry key="..\:/Users/paliy/StudioProjects/KeyPass/app/src/main/res/layout/fragment_home.xml" value="0.16304347826086957" />
<entry key="..\:/Users/paliy/StudioProjects/KeyPass/app/src/main/res/layout/item_accounts.xml" value="0.1" />
<entry key="..\:/Users/paliy/StudioProjects/KeyPass/app/src/main/res/layout/item_totp.xml" value="0.5585331452750353" />
<entry key="..\:/Users/paliy/StudioProjects/KeyPass/app/src/main/res/layout/item_accounts.xml" value="0.388259526261586" />
<entry key="..\:/Users/paliy/StudioProjects/KeyPass/app/src/main/res/layout/item_totp.xml" value="0.2" />
<entry key="..\:/Users/paliy/StudioProjects/KeyPass/app/src/main/res/layout/layout_no_accounts.xml" value="0.17074275362318841" />
<entry key="..\:/Users/paliy/StudioProjects/KeyPass/app/src/main/res/layout/nav_divider_item_layout.xml" value="0.2" />
<entry key="..\:/Users/paliy/StudioProjects/KeyPass/app/src/main/res/layout/nav_email_folder_item_layout.xml" value="0.2" />
<entry key="..\:/Users/paliy/StudioProjects/KeyPass/app/src/main/res/layout/nav_menu_item_layout.xml" value="0.2" />
<entry key="..\:/Users/paliy/StudioProjects/KeyPass/app/src/main/res/menu/bottom_app_bar_detail.xml" value="0.2" />
<entry key="..\:/Users/paliy/StudioProjects/KeyPass/app/src/main/res/menu/menu_delete.xml" value="0.2" />
<entry key="..\:/Users/paliy/StudioProjects/KeyPass/app/src/main/res/xml/backup_preferences.xml" value="0.4287690179806362" />
<entry key="..\:/Users/paliy/StudioProjects/KeyPass/app/src/production/res/mipmap-anydpi-v26/ic_launcher.xml" value="0.21614583333333334" />
+1 -1
View File
@@ -76,7 +76,7 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.5.31"
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'com.google.android.material:material:1.5.0-alpha05'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
implementation 'androidx.preference:preference-ktx:1.1.1'
@@ -3,6 +3,7 @@ package com.yogeshpaliyal.keypass
import android.app.Application
import androidx.hilt.work.HiltWorkerFactory
import androidx.work.Configuration
import com.google.android.material.color.DynamicColors
import dagger.hilt.android.HiltAndroidApp
import javax.inject.Inject
@@ -20,6 +21,8 @@ class MyApplication : Application(), Configuration.Provider {
override fun onCreate() {
super.onCreate()
DynamicColors.applyToActivitiesIfAvailable(this)
}
override fun getWorkManagerConfiguration(): Configuration {
@@ -55,7 +55,7 @@ class BottomNavDrawerFragment :
0
).apply {
fillColor = ColorStateList.valueOf(
foregroundContext.themeColor(R.attr.colorPrimarySurface)
foregroundContext.themeColor(R.attr.colorSurface)
)
elevation = resources.getDimension(R.dimen.plane_16)
shadowCompatibilityMode = MaterialShapeDrawable.SHADOW_COMPAT_MODE_NEVER
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?attr/colorSecondary" android:state_checked="true"/>
<item android:color="@color/color_on_primary_surface_emphasis_medium" />
<item android:color="?attr/colorPrimary" android:state_checked="true"/>
<item android:color="?attr/colorOnSurface" />
</selector>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?attr/colorOnPrimarySurface" android:alpha="0.2" />
<item android:color="?attr/colorOnSurface" android:alpha="0.2" />
</selector>
@@ -14,10 +14,10 @@
android:fillColor="#e6e6e6"/>
<path
android:pathData="M823.272,359.461h33.639v29.733h-33.639z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M823.272,307.996h33.639v29.262h-33.639z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M823.272,359.461h33.639v29.733h-33.639z"
android:fillColor="#fff"/>
@@ -41,10 +41,10 @@
android:fillColor="#e6e6e6"/>
<path
android:pathData="M585.272,359.461h33.639v29.733h-33.639z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M585.272,307.996h33.639v29.262h-33.639z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M585.272,359.461h33.639v29.733h-33.639z"
android:fillColor="#fff"/>
@@ -68,10 +68,10 @@
android:fillColor="#e6e6e6"/>
<path
android:pathData="M315.053,329.181h44.95v39.731h-44.95z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M315.053,260.412h44.95v39.101h-44.95z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M315.053,329.181h44.95v39.731h-44.95z"
android:fillColor="#fff"/>
@@ -86,119 +86,119 @@
android:fillColor="#fff"/>
<path
android:pathData="M0,448.62h963.951v2h-963.951z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M122.773,352.472a29.099,59.374 0,1 0,58.199 0a29.099,59.374 0,1 0,-58.199 0z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M154.559,449.658c-11.655,-69.925 -0.117,-139.598 0.001,-140.293l2.267,0.384c-0.117,0.692 -11.588,69.998 0.001,139.532Z"
android:fillColor="#6c63ff"/>
android:fillColor="?attr/colorTertiaryContainer"/>
<path
android:pathData="M151.178,353.78l26.314,-14.075l1.085,2.028l-26.314,14.075z"
android:fillColor="#6c63ff"/>
android:fillColor="?attr/colorTertiaryContainer"/>
<path
android:pathData="M123.406,348.783l1.085,-2.028l26.311,14.083l-1.085,2.028z"
android:fillColor="#6c63ff"/>
android:fillColor="?attr/colorTertiaryContainer"/>
<path
android:pathData="M25.04,260.903a56.915,116.129 0,1 0,113.83 0a56.915,116.129 0,1 0,-113.83 0z"
android:fillColor="#6c63ff"/>
android:fillColor="?attr/colorTertiaryContainer"/>
<path
android:pathData="M88.295,450.808c-22.765,-136.585 -0.23,-272.673 0.001,-274.032l2.267,0.384c-0.23,1.355 -22.698,137.077 0.001,273.271Z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M81.115,264.43l51.468,-27.529l1.085,2.028l-51.468,27.529z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M26.797,252.719l1.085,-2.028l51.46,27.543l-1.085,2.028z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M138.87,191.008a77.883,158.914 0,1 0,155.767 0a77.883,158.914 0,1 0,-155.767 0z"
android:fillColor="#6c63ff"/>
android:fillColor="?attr/colorTertiaryContainer"/>
<path
android:pathData="M225.847,450.808c-31.14,-186.837 -0.314,-372.992 0.001,-374.851l2.267,0.384c-0.314,1.855 -31.074,187.644 0.001,374.089Z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M215.803,196.207l70.429,-37.671l1.085,2.028l-70.429,37.671z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M141.474,179.435l1.085,-2.028l70.419,37.69l-1.085,2.028z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M841.93,352.472a29.099,59.374 0,1 0,58.199 0a29.099,59.374 0,1 0,-58.199 0z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M868.342,449.658c11.655,-69.925 0.117,-139.598 -0.001,-140.293l-2.267,0.384c0.117,0.692 11.588,69.998 -0.001,139.532Z"
android:fillColor="#6c63ff"/>
android:fillColor="?attr/colorTertiaryContainer"/>
<path
android:pathData="M844.325,341.733l1.085,-2.028l26.314,14.075l-1.085,2.028z"
android:fillColor="#6c63ff"/>
android:fillColor="?attr/colorTertiaryContainer"/>
<path
android:pathData="M872.1,360.838l26.311,-14.083l1.085,2.028l-26.311,14.083z"
android:fillColor="#6c63ff"/>
android:fillColor="?attr/colorTertiaryContainer"/>
<path
android:pathData="M884.031,260.903a56.915,116.129 0,1 0,113.83 0a56.915,116.129 0,1 0,-113.83 0z"
android:fillColor="#6c63ff"/>
android:fillColor="?attr/colorTertiaryContainer"/>
<path
android:pathData="M934.607,450.808c22.765,-136.585 0.23,-272.673 -0.001,-274.032l-2.267,0.384c0.23,1.355 22.698,137.077 -0.001,273.271Z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M889.235,238.928l1.085,-2.028l51.468,27.529l-1.085,2.028z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M943.559,278.235l51.46,-27.543l1.085,2.028l-51.46,27.543z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M728.265,191.008a77.883,158.914 0,1 0,155.767 0a77.883,158.914 0,1 0,-155.767 0z"
android:fillColor="#6c63ff"/>
android:fillColor="?attr/colorTertiaryContainer"/>
<path
android:pathData="M797.055,450.808c31.14,-186.837 0.314,-372.992 -0.001,-374.851l-2.267,0.384c0.314,1.855 31.074,187.644 -0.001,374.089Z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M735.584,160.563l1.085,-2.028l70.429,37.671l-1.085,2.028z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M809.923,215.097l70.419,-37.69l1.085,2.028l-70.419,37.69z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M589.604,101.466l9.206,-7.363c-7.151,-0.789 -10.09,3.111 -11.292,6.198 -5.587,-2.32 -11.669,0.72 -11.669,0.72l18.419,6.687A13.938,13.938 0,0 0,589.604 101.466Z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M364.604,36.466l9.206,-7.363c-7.151,-0.789 -10.09,3.111 -11.292,6.198 -5.587,-2.32 -11.669,0.72 -11.669,0.72l18.419,6.687A13.938,13.938 0,0 0,364.604 36.466Z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M731.604,7.466l9.206,-7.363c-7.151,-0.789 -10.09,3.111 -11.292,6.198 -5.587,-2.32 -11.669,0.72 -11.669,0.72l18.419,6.687A13.938,13.938 0,0 0,731.604 7.466Z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M750.191,437.052a13.918,13.918 0,0 0,-6.97 1.87A14.982,14.982 0,0 0,718.191 450.052h45.95A13.99,13.99 0,0 0,750.191 437.052Z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M283.191,437.052a13.918,13.918 0,0 0,-6.97 1.87A14.982,14.982 0,0 0,251.191 450.052h45.95A13.99,13.99 0,0 0,283.191 437.052Z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M522.191,437.052a13.918,13.918 0,0 0,-6.97 1.87A14.982,14.982 0,0 0,490.191 450.052h45.95A13.99,13.99 0,0 0,522.191 437.052Z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M471.759,404.228l-132.568,0l0,4.276l20.675,0l0,40.626l4.276,0l0,-40.626l80.527,0l0,40.626l4.277,0l0,-40.626l22.813,0l0,-4.276z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M339.452,391.434h132.568v4.276h-132.568z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M339.452,380.743h132.568v4.276h-132.568z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M339.452,370.052h132.568v4.276h-132.568z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M678.759,404.228l-132.568,0l0,4.276l20.675,0l0,40.626l4.276,0l0,-40.626l80.527,0l0,40.626l4.277,0l0,-40.626l22.813,0l0,-4.276z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M546.452,391.434h132.568v4.276h-132.568z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M546.452,380.743h132.568v4.276h-132.568z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
<path
android:pathData="M546.452,370.052h132.568v4.276h-132.568z"
android:fillColor="#3f3d56"/>
android:fillColor="?attr/colorPrimary"/>
</vector>
@@ -93,7 +93,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_anchor="@id/bottomAppBar"
app:srcCompat="@drawable/asl_add_save" />
app:srcCompat="@drawable/asl_add_save"
app:shapeAppearanceOverlay="@style/ShapeAppearance.KeyPass.Cirle"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
+179 -182
View File
@@ -1,210 +1,207 @@
<?xml version="1.0" encoding="utf-8"?>
<layout>
<data>
<variable
name="accountData"
type="com.yogeshpaliyal.keypass.data.AccountModel" />
</data>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.core.widget.NestedScrollView
<androidx.coordinatorlayout.widget.CoordinatorLayout 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"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:fillViewport="true"
android:id="@+id/nestedScrollView"
android:paddingHorizontal="@dimen/grid_0_5"
android:paddingVertical="@dimen/grid_0_5">
android:layout_height="match_parent">
<com.yogeshpaliyal.keypass.custom_views.MaskedCardView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.ConstraintLayout
<androidx.core.widget.NestedScrollView
android:id="@+id/nestedScrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="match_parent"
android:fillViewport="true"
android:paddingHorizontal="@dimen/grid_0_5"
android:paddingVertical="@dimen/grid_0_5"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<com.google.android.material.textfield.TextInputLayout
app:layout_constraintTop_toTopOf="@id/topGuideline"
app:layout_constraintStart_toStartOf="@id/startGuideline"
app:layout_constraintEnd_toEndOf="@id/endGuideline"
android:layout_width="0dp"
android:id="@+id/tilAccountName"
android:layout_height="wrap_content"
android:hint="@string/account_name">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etAccountName"
android:singleLine="true"
android:text="@={accountData.title}"
android:inputType="textNoSuggestions|text"
android:layout_width="match_parent"
android:importantForAutofill="no"
android:layout_height="wrap_content" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_marginTop="@dimen/grid_1"
app:layout_constraintTop_toBottomOf="@id/tilAccountName"
app:layout_constraintStart_toStartOf="@id/startGuideline"
app:layout_constraintEnd_toEndOf="@id/endGuideline"
android:layout_width="0dp"
android:id="@+id/tilUsername"
android:layout_height="wrap_content"
android:hint="@string/username_email_phone">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etUsername"
android:importantForAutofill="no"
android:layout_width="match_parent"
android:singleLine="true"
android:text="@={accountData.username}"
android:inputType="textNoSuggestions|text"
android:layout_height="wrap_content" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_marginTop="@dimen/grid_1"
app:layout_constraintTop_toBottomOf="@id/tilUsername"
app:layout_constraintStart_toStartOf="@id/startGuideline"
app:layout_constraintEnd_toEndOf="@id/endGuideline"
android:layout_width="0dp"
android:id="@+id/tilPassword"
android:layout_height="wrap_content"
android:hint="@string/password"
app:startIconDrawable="@drawable/ic_round_refresh_24"
app:passwordToggleEnabled="true">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etPassword"
android:importantForAutofill="no"
android:inputType="textNoSuggestions|textPassword"
android:singleLine="true"
android:text="@={accountData.password}"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_marginTop="@dimen/grid_1"
app:layout_constraintTop_toBottomOf="@id/tilPassword"
app:layout_constraintStart_toStartOf="@id/startGuideline"
app:layout_constraintEnd_toEndOf="@id/endGuideline"
android:layout_width="0dp"
android:id="@+id/tilTags"
android:layout_height="wrap_content"
android:hint="@string/tags_comma_separated_optional">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etTag"
android:singleLine="true"
android:importantForAutofill="no"
android:text="@={accountData.tags}"
android:inputType="textNoSuggestions|text"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_marginTop="@dimen/grid_1"
app:layout_constraintTop_toBottomOf="@id/tilTags"
app:layout_constraintStart_toStartOf="@id/startGuideline"
app:layout_constraintEnd_toEndOf="@id/endGuideline"
android:layout_width="0dp"
android:id="@+id/tilWebsite"
android:layout_height="wrap_content"
android:hint="@string/website_url_optional">
<com.google.android.material.textfield.TextInputEditText
android:importantForAutofill="no"
android:id="@+id/etWebsite"
android:inputType="textNoSuggestions|textWebEditText"
android:text="@={accountData.site}"
android:singleLine="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_marginTop="@dimen/grid_1"
app:layout_constraintTop_toBottomOf="@id/tilWebsite"
app:layout_constraintStart_toStartOf="@id/startGuideline"
app:layout_constraintEnd_toEndOf="@id/endGuideline"
android:layout_width="0dp"
android:id="@+id/tilNotes"
android:layout_height="wrap_content"
android:hint="@string/notes_optional">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etNotes"
android:lines="3"
android:importantForAutofill="no"
android:minLines="3"
android:text="@={accountData.notes}"
android:inputType="textNoSuggestions|text"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</com.google.android.material.textfield.TextInputLayout>
<Space
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/grid_1"
app:layout_constraintTop_toBottomOf="@id/tilNotes" />
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.Guideline
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/startGuideline"
app:layout_constraintGuide_begin="@dimen/grid_1"
android:orientation="vertical"/>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilAccountName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="@string/account_name"
app:layout_constraintEnd_toEndOf="@id/endGuideline"
app:layout_constraintStart_toStartOf="@id/startGuideline"
app:layout_constraintTop_toTopOf="@id/topGuideline">
<androidx.constraintlayout.widget.Guideline
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/endGuideline"
app:layout_constraintGuide_end="@dimen/grid_1"
android:orientation="vertical"/>
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etAccountName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:importantForAutofill="no"
android:inputType="textNoSuggestions|text"
android:singleLine="true"
android:text="@={accountData.title}" />
</com.google.android.material.textfield.TextInputLayout>
<androidx.constraintlayout.widget.Guideline
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/topGuideline"
app:layout_constraintGuide_begin="@dimen/grid_1"
android:orientation="horizontal"/>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilUsername"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/grid_1"
android:hint="@string/username_email_phone"
app:layout_constraintEnd_toEndOf="@id/endGuideline"
app:layout_constraintStart_toStartOf="@id/startGuideline"
app:layout_constraintTop_toBottomOf="@id/tilAccountName">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etUsername"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:importantForAutofill="no"
android:inputType="textNoSuggestions|text"
android:singleLine="true"
android:text="@={accountData.username}" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilPassword"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/grid_1"
android:hint="@string/password"
app:layout_constraintEnd_toEndOf="@id/endGuideline"
app:layout_constraintStart_toStartOf="@id/startGuideline"
app:layout_constraintTop_toBottomOf="@id/tilUsername"
app:passwordToggleEnabled="true"
app:startIconDrawable="@drawable/ic_round_refresh_24">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:importantForAutofill="no"
android:inputType="textNoSuggestions|textPassword"
android:singleLine="true"
android:text="@={accountData.password}" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilTags"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/grid_1"
android:hint="@string/tags_comma_separated_optional"
app:layout_constraintEnd_toEndOf="@id/endGuideline"
app:layout_constraintStart_toStartOf="@id/startGuideline"
app:layout_constraintTop_toBottomOf="@id/tilPassword">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etTag"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:importantForAutofill="no"
android:inputType="textNoSuggestions|text"
android:singleLine="true"
android:text="@={accountData.tags}" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilWebsite"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/grid_1"
android:hint="@string/website_url_optional"
app:layout_constraintEnd_toEndOf="@id/endGuideline"
app:layout_constraintStart_toStartOf="@id/startGuideline"
app:layout_constraintTop_toBottomOf="@id/tilTags">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etWebsite"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:importantForAutofill="no"
android:inputType="textNoSuggestions|textWebEditText"
android:singleLine="true"
android:text="@={accountData.site}" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilNotes"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/grid_1"
android:hint="@string/notes_optional"
app:layout_constraintEnd_toEndOf="@id/endGuideline"
app:layout_constraintStart_toStartOf="@id/startGuideline"
app:layout_constraintTop_toBottomOf="@id/tilWebsite">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etNotes"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:importantForAutofill="no"
android:inputType="textNoSuggestions|text"
android:lines="3"
android:minLines="3"
android:text="@={accountData.notes}" />
</com.google.android.material.textfield.TextInputLayout>
<Space
android:layout_width="match_parent"
android:layout_height="@dimen/grid_1"
app:layout_constraintTop_toBottomOf="@id/tilNotes" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.Guideline
android:id="@+id/startGuideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="@dimen/grid_1" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/endGuideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_end="@dimen/grid_1" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/topGuideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_begin="@dimen/grid_1" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.yogeshpaliyal.keypass.custom_views.MaskedCardView>
</androidx.core.widget.NestedScrollView>
</androidx.core.widget.NestedScrollView>
<com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/bottomAppBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:fabAlignmentMode="end"
app:hideOnScroll="true"
app:fabCradleRoundedCornerRadius="@dimen/bottom_app_bar_fab_cradle_corner_radius"
app:fabCradleMargin="@dimen/bottom_app_bar_fab_cradle_margin"
app:navigationIcon="@drawable/ic_baseline_arrow_back_ios_24"/>
<com.google.android.material.bottomappbar.BottomAppBar
android:id="@+id/bottomAppBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:fabAlignmentMode="end"
app:fabCradleMargin="@dimen/bottom_app_bar_fab_cradle_margin"
app:fabCradleRoundedCornerRadius="@dimen/bottom_app_bar_fab_cradle_corner_radius"
app:hideOnScroll="true"
app:navigationIcon="@drawable/ic_baseline_arrow_back_ios_24"
app:navigationIconTint="?attr/colorOnSurface" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_round_done_24"
android:layout_marginEnd="@dimen/grid_2"
app:layout_anchor="@id/bottomAppBar"
android:id="@+id/btnSave"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/btnSave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/grid_2"
app:layout_anchor="@id/bottomAppBar"
app:shapeAppearanceOverlay="@style/ShapeAppearance.KeyPass.Cirle"
app:srcCompat="@drawable/ic_round_done_24" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>
+3 -1
View File
@@ -27,7 +27,9 @@
android:elevation="@dimen/plane_00"
android:clickable="true"
android:focusable="true"
app:cardElevation="0dp"
app:cardElevation="1dp"
app:strokeWidth="0dp"
app:layout_constraintBottom_toBottomOf="parent"
android:onClick="@{(view)->listener.onItemClick(view, model)}"
android:layout_marginVertical="@dimen/grid_0_25"
android:layout_marginHorizontal="@dimen/grid_0_5">
+4 -2
View File
@@ -25,12 +25,14 @@
app:layout_constraintEnd_toEndOf="parent"
app:cardUseCompatPadding="true"
android:elevation="@dimen/plane_00"
app:cardElevation="0dp"
app:cardElevation="1dp"
app:strokeWidth="0dp"
android:clickable="true"
android:focusable="true"
android:onClick="@{(view)->listener.onItemClick(view, model)}"
android:layout_marginVertical="@dimen/grid_0_25"
android:layout_marginHorizontal="@dimen/grid_0_5">
android:layout_marginHorizontal="@dimen/grid_0_5"
app:layout_constraintBottom_toBottomOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -29,7 +29,7 @@
android:layout_marginHorizontal="@dimen/grid_4"
android:text="@{navDivider.title}"
android:textAppearance="?attr/textAppearanceOverline"
android:textColor="@color/color_on_primary_surface_emphasis_medium"
android:textColor="?attr/colorOnSurface"
android:drawablePadding="@dimen/grid_4"
app:drawableTopCompat="@drawable/nav_divider_top" />
@@ -33,16 +33,15 @@
android:layout_height="@dimen/navigation_drawer_menu_item_height"
android:paddingLeft="@dimen/grid_4"
android:paddingRight="@dimen/grid_4"
android:background="?attr/selectableItemBackground"
android:gravity="center_vertical|start"
android:onClick="@{() -> navListener.onNavEmailFolderClicked(navEmailFolder)}"
android:ellipsize="end"
android:lines="1"
android:text="@{navEmailFolder.category}"
android:textColor="@color/color_on_primary_surface_emphasis_medium"
android:textColor="?attr/colorOnSurface"
android:textAppearance="?attr/textAppearanceSubtitle1"
app:drawableStartCompat="@drawable/ic_twotone_folder"
app:drawableTint="@color/color_on_primary_surface_emphasis_medium"
app:drawableTint="?attr/colorOnSurface"
android:drawablePadding="@dimen/grid_4"
tools:text="Pine Elementary" />
@@ -32,7 +32,6 @@
android:layout_height="@dimen/navigation_drawer_menu_item_height"
android:paddingLeft="@dimen/grid_4"
android:paddingRight="@dimen/grid_4"
android:background="?attr/selectableItemBackground"
android:gravity="center_vertical|start"
android:onClick="@{() -> navListener.onNavMenuItemClicked(navMenuItem)}"
android:ellipsize="end"
+5 -1
View File
@@ -1,12 +1,16 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.KeyPass" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<style name="Theme.KeyPass" parent="Theme.Material3.Dark.NoActionBar">
<!--Color-->
<item name="colorPrimary">@color/keypass_blue_200</item>
<item name="colorPrimaryVariant">@color/keypass_blue_300</item>
<item name="colorSecondary">@color/keypass_orange_300</item>
<item name="colorSecondaryVariant">@color/keypass_orange_300</item>
<item name="colorPrimaryContainer">@color/keypass_orange_300</item>
<item name="colorTertiaryContainer">@color/blue_800</item>
<item name="android:colorBackground">@color/keypass_black_900</item>
<item name="colorSurface">@color/keypass_black_800</item>
<item name="colorPrimarySurfaceVariant">?attr/colorSurface</item>
+4
View File
@@ -12,6 +12,7 @@
<color name="keypass_blue_600">#4a6572</color>
<color name="keypass_blue_700">#344955</color>
<color name="keypass_blue_800">#232f34</color>
<color name="blue_800">#6c63ff</color>
<color name="keypass_orange_300">#fbd790</color>
<color name="keypass_orange_400">#f9be64</color>
@@ -34,4 +35,7 @@
<!--handles contrast by either dynamically coloring the nav bar handle (gesture nav) -->
<!--or automatically applying a translucent background (3-button mode).-->
<color name="nav_bar">@color/keypass_black_900_alpha_020</color>
</resources>
+5
View File
@@ -23,4 +23,9 @@
<dimen name="keypass_medium_component_corner_radius">0dp</dimen>
<dimen name="keypass_large_component_corner_radius">12dp</dimen>
<style name="ShapeAppearance.KeyPass.Cirle" parent="">
<item name="cornerFamily">rounded</item>
<item name="cornerSize">50%</item>
</style>
</resources>
+3 -2
View File
@@ -1,8 +1,10 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.KeyPass" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<style name="Theme.KeyPass" parent="Theme.Material3.Light.NoActionBar">
<!--Color-->
<item name="colorPrimary">@color/keypass_blue_700</item>
<item name="colorPrimaryContainer">@color/keypass_orange_500</item>
<item name="colorTertiaryContainer">@color/blue_800</item>
<item name="colorPrimaryVariant">@color/keypass_blue_800</item>
<item name="colorSecondary">@color/keypass_orange_500</item>
<item name="colorSecondaryVariant">@color/keypass_orange_400</item>
@@ -52,7 +54,6 @@
<item name="motionInterpolatorOutgoing">@android:interpolator/accelerate_cubic</item>
<!--Styles-->
<item name="bottomAppBarStyle">@style/Widget.MaterialComponents.BottomAppBar.PrimarySurface</item>
<item name="bottomSheetStyle">@style/Widget.MaterialComponents.BottomSheet.Modal</item>
<item name="navigationViewStyle">@style/Widget.KeyPass.NavigationView</item>
<item name="chipStyle">@style/Widget.KeyPass.Chip.Entry</item>