mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Fix special button
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="?attr/colorPrimaryDark" android:state_pressed="true" />
|
||||
<item android:color="@color/grey_dark" android:state_enabled="false" />
|
||||
<item android:color="?android:windowBackground" android:state_enabled="true" />
|
||||
</selector>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:color="@color/white"
|
||||
tools:targetApi="lollipop">
|
||||
<item>
|
||||
<shape>
|
||||
<corners
|
||||
android:topLeftRadius="0dp"
|
||||
android:topRightRadius="40dp"
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="0dp"/>
|
||||
<solid android:color="?android:attr/windowBackground"/>
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
@@ -3,9 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:color="@color/white"
|
||||
tools:targetApi="lollipop">
|
||||
<item
|
||||
android:bottom="-2dp"
|
||||
android:left="-2dp">
|
||||
<item>
|
||||
<shape>
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
@@ -15,13 +13,8 @@
|
||||
android:topRightRadius="40dp"
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="0dp"/>
|
||||
<padding
|
||||
android:left="4dp"
|
||||
android:right="12dp"
|
||||
android:top="18dp"
|
||||
android:bottom="8dp"/>
|
||||
<solid
|
||||
android:color="?android:windowBackground" />
|
||||
android:color="@color/transparent"/>
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
@@ -1,9 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:state_pressed="true"
|
||||
android:bottom="-2dp"
|
||||
android:left="-2dp">
|
||||
android:state_pressed="true">
|
||||
<shape>
|
||||
<corners
|
||||
android:topLeftRadius="0dp"
|
||||
@@ -18,9 +16,7 @@
|
||||
<solid android:color="@color/grey_dark"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item
|
||||
android:bottom="-2dp"
|
||||
android:left="-2dp">
|
||||
<item>
|
||||
<shape>
|
||||
<corners
|
||||
android:topLeftRadius="0dp"
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/white">
|
||||
<item>
|
||||
<shape>
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@color/green" />
|
||||
<corners
|
||||
android:topLeftRadius="0dp"
|
||||
android:topRightRadius="40dp"
|
||||
android:bottomLeftRadius="0dp"
|
||||
android:bottomRightRadius="0dp"/>
|
||||
<solid
|
||||
android:color="@color/transparent"/>
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -3,16 +3,30 @@
|
||||
android:id="@+id/lock_button"
|
||||
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="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/lock_button_background"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="-2dp"
|
||||
android:layout_marginLeft="-2dp"
|
||||
android:layout_marginBottom="-2dp"
|
||||
tools:targetApi="lollipop"
|
||||
android:elevation="4dp"
|
||||
android:background="@drawable/background_start_bottom_button"
|
||||
style="@style/KeepassDXStyle.Special.Button.Background"
|
||||
android:layout_gravity="bottom|start"
|
||||
android:contentDescription="@string/menu_lock" />
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/lock_button_stroke"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="-2dp"
|
||||
android:layout_marginLeft="-2dp"
|
||||
android:layout_marginBottom="-2dp"
|
||||
tools:targetApi="lollipop"
|
||||
android:elevation="4dp"
|
||||
style="@style/KeepassDXStyle.Special.Button.Stroke"
|
||||
android:layout_gravity="bottom|start"
|
||||
android:contentDescription="@string/menu_lock" />
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
|
||||
@@ -302,6 +302,17 @@
|
||||
<item name="backgroundTint">?android:attr/windowBackground</item>
|
||||
</style>
|
||||
|
||||
<!-- Special button Style -->
|
||||
<style name="KeepassDXStyle.Special.Button.Background" parent="KeepassDXStyle.v21.Button">
|
||||
<item name="android:background">@drawable/btn_special_start_bottom_background</item>
|
||||
<item name="backgroundTint">@color/background_special_button_color</item>
|
||||
</style>
|
||||
<style name="KeepassDXStyle.Special.Button.Stroke" parent="KeepassDXStyle.v21.Button">
|
||||
<item name="android:background">@drawable/btn_special_start_bottom_stroke</item>
|
||||
<item name="backgroundTint">?android:attr/textColorPrimary</item>
|
||||
<item name="backgroundTintMode">src_atop</item>
|
||||
</style>
|
||||
|
||||
<!-- FAB -->
|
||||
<style name="KeepassDXStyle.v21.Fab" parent="KeepassDXStyle.Light.v21" />
|
||||
<style name="KeepassDXStyle.Fab" parent="KeepassDXStyle.v21.Fab">
|
||||
|
||||
Reference in New Issue
Block a user