mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-04-25 08:16:07 +00:00
Merge pull request #808 from Hacker437/migrate-buttons
Migrate App Compat Buttons To Material Buttons
This commit is contained in:
commit
a9d850aa01
3 changed files with 33 additions and 11 deletions
23
app/src/main/res/color/dialog_button_ripple_color.xml
Normal file
23
app/src/main/res/color/dialog_button_ripple_color.xml
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2017 The Android Open Source Project
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:alpha="@dimen/mtrl_low_ripple_pressed_alpha" android:color="?attr/colorSecondary" android:state_pressed="true"/>
|
||||
<item android:alpha="@dimen/mtrl_low_ripple_focused_alpha" android:color="?attr/colorSecondary" android:state_focused="true" android:state_hovered="true"/>
|
||||
<item android:alpha="@dimen/mtrl_low_ripple_focused_alpha" android:color="?attr/colorSecondary" android:state_focused="true"/>
|
||||
<item android:alpha="@dimen/mtrl_low_ripple_hovered_alpha" android:color="?attr/colorSecondary" android:state_hovered="true"/>
|
||||
<item android:alpha="@dimen/mtrl_low_ripple_default_alpha" android:color="?attr/colorSecondary"/>
|
||||
|
||||
</selector>
|
|
@ -28,10 +28,8 @@
|
|||
android:layout_height="250dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.496"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/toolbar_layout"
|
||||
app:layout_constraintVertical_bias="0.399" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/toolbar_layout" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTransfer"
|
||||
|
@ -41,6 +39,7 @@
|
|||
android:textColor="?attr/primaryText"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="5dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tvDescription"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
@ -54,10 +53,7 @@
|
|||
android:text="@string/transfer_entry_description"
|
||||
app:layout_constraintBottom_toTopOf="@+id/ivQrCode"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="1.0" />
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvIssuer"
|
||||
|
@ -88,7 +84,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:text="@string/next"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/code_primary_text"
|
||||
|
@ -101,7 +97,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:text="@string/previous"
|
||||
android:textAllCaps="false"
|
||||
android:visibility="invisible"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?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:paddingTop="12dp"
|
||||
|
@ -53,7 +54,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/colorSecondary"
|
||||
android:text="@string/save"
|
||||
style="?android:attr/borderlessButtonStyle" />
|
||||
app:rippleColor="@color/dialog_button_ripple_color"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnClear"
|
||||
|
@ -61,7 +63,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/colorSecondary"
|
||||
android:text="@string/clear"
|
||||
style="?android:attr/borderlessButtonStyle" />
|
||||
app:rippleColor="@color/dialog_button_ripple_color"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
Loading…
Add table
Reference in a new issue