Migrate Crystal's theme to the new MaterialComponents style. Also update all buttons in the app to use the new MaterialButton.

This commit is contained in:
Severiano Jaramillo 2018-11-29 13:14:45 -06:00
parent 37ace257bd
commit e2f3761a82
18 changed files with 225 additions and 206 deletions

View file

@ -21,7 +21,7 @@ public class LicenseActivity extends AppCompatActivity {
@BindView(R.id.wvEULA) WebView wvEULA; @BindView(R.id.wvEULA) WebView wvEULA;
@BindView(R.id.btnDisAgree) @BindView(R.id.btnDisagree)
Button btnDisAgree; Button btnDisAgree;
@BindView(R.id.btnAgree) @BindView(R.id.btnAgree)
@ -91,7 +91,7 @@ public class LicenseActivity extends AppCompatActivity {
finish(); finish();
} }
@OnClick(R.id.btnDisAgree) @OnClick(R.id.btnDisagree)
public void onDisagree() { public void onDisagree() {
finish(); finish();
} }

View file

@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<!-- Pressed state -->
<item
android:state_enabled="true"
android:state_pressed="true">
<set>
<objectAnimator
android:duration="100"
android:propertyName="translationZ"
android:valueTo="2dp"
android:valueType="floatType" />
<objectAnimator
android:duration="0"
android:propertyName="elevation"
android:valueTo="6dp"
android:valueType="floatType" />
</set>
</item>
<!-- Hover state. This is triggered via mouse. -->
<item
android:state_enabled="true"
android:state_hovered="true">
<set>
<objectAnimator
android:duration="100"
android:propertyName="translationZ"
android:valueTo="2dp"
android:valueType="floatType" />
<objectAnimator
android:duration="0"
android:propertyName="elevation"
android:valueTo="6dp"
android:valueType="floatType" />
</set>
</item>
<!-- Focused state. This is triggered via keyboard. -->
<item
android:state_enabled="true"
android:state_focused="true">
<set>
<objectAnimator
android:duration="100"
android:propertyName="translationZ"
android:valueTo="2dp"
android:valueType="floatType" />
<objectAnimator
android:duration="0"
android:propertyName="elevation"
android:valueTo="6dp"
android:valueType="floatType" />
</set>
</item>
<!-- Base state (enabled, not pressed) -->
<item android:state_enabled="true">
<set>
<objectAnimator
android:duration="100"
android:propertyName="translationZ"
android:startDelay="100"
android:valueTo="0dp"
android:valueType="floatType"
tools:ignore="UnusedAttribute" />
<objectAnimator
android:duration="0"
android:propertyName="elevation"
android:valueTo="6dp"
android:valueType="floatType" />
</set>
</item>
<!-- Disabled state -->
<item>
<set>
<objectAnimator
android:duration="0"
android:propertyName="translationZ"
android:valueTo="0dp"
android:valueType="floatType" />
<objectAnimator
android:duration="0"
android:propertyName="elevation"
android:valueTo="0dp"
android:valueType="floatType" />
</set>
</item>
</selector>

View file

@ -87,7 +87,6 @@
android:visibility="visible" android:visibility="visible"
app:backgroundTint="@color/colorPrimary" app:backgroundTint="@color/colorPrimary"
app:fabSize="normal" app:fabSize="normal"
android:theme="@style/BlueButton"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/secondView" app:layout_constraintTop_toTopOf="@id/secondView"
app:srcCompat="@drawable/ic_add_24dp" /> app:srcCompat="@drawable/ic_add_24dp" />

View file

@ -43,7 +43,7 @@
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginStart="@dimen/activity_horizontal_margin" android:layout_marginStart="@dimen/activity_horizontal_margin"
android:text="Crypto addresses" android:text="Crypto addresses"
android:textAppearance="@style/TextAppearance.Body1" android:textAppearance="@style/TextAppearance.Crystal.Body1"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintTop_toTopOf="@id/btnAddAddress" app:layout_constraintTop_toTopOf="@id/btnAddAddress"
app:layout_constraintStart_toStartOf="parent"/> app:layout_constraintStart_toStartOf="parent"/>
@ -58,26 +58,29 @@
tools:listitem="@layout/contact_address_list_item" tools:listitem="@layout/contact_address_list_item"
tools:itemCount="1"/> tools:itemCount="1"/>
<Button <RelativeLayout
android:id="@+id/btnCancel" android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_different_section" android:layout_marginTop="@dimen/spacing_different_section"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:theme="@style/RedButton"
android:text="@string/cancel"
app:layout_constraintTop_toBottomOf="@id/rvContactAddresses"
app:layout_constraintStart_toStartOf="parent"/>
<Button
android:id="@+id/btnCreate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/activity_horizontal_margin" android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:theme="@style/BlueButton" app:layout_constraintTop_toBottomOf="@id/rvContactAddresses">
android:text="Create" <com.google.android.material.button.MaterialButton
app:layout_constraintTop_toTopOf="@id/btnCancel" android:id="@+id/btnCreate"
app:layout_constraintEnd_toEndOf="parent"/> style="@style/Widget.Crystal.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_marginBottom="4dp"
android:text="@string/create"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/btnCancel"
style="@style/Widget.Crystal.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:layout_toStartOf="@id/btnCreate"
android:text="@android:string/cancel"/>
</RelativeLayout>
<cy.agorise.crystalwallet.util.BottomStatusBar <cy.agorise.crystalwallet.util.BottomStatusBar
android:id="@+id/bottomStatusBar" android:id="@+id/bottomStatusBar"

View file

@ -21,34 +21,28 @@
</ScrollView> </ScrollView>
<LinearLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:background="@android:color/white">
android:background="@android:color/white" <com.google.android.material.button.MaterialButton
android:clipToPadding="false"
android:padding="4dp"
android:orientation="horizontal">
<Button
android:id="@+id/btnDisAgree"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="0.50"
android:layout_marginEnd="8dp"
android:theme="@style/RedButton"
android:textColor="@color/white"
android:textSize="14sp"
android:text="@string/disagree" />
<Button
android:id="@+id/btnAgree" android:id="@+id/btnAgree"
android:layout_width="match_parent" style="@style/Widget.Crystal.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0.5" android:layout_alignParentEnd="true"
android:layout_marginStart="8dp" android:layout_marginBottom="4dp"
android:theme="@style/BlueButton" android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:text="@string/agree" android:text="@string/agree"
android:textSize="14sp" android:backgroundTint="#139657"/>
android:textColor="@color/white" /> <com.google.android.material.button.MaterialButton
</LinearLayout> android:id="@+id/btnDisagree"
style="@style/Widget.Crystal.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:layout_toStartOf="@id/btnAgree"
android:text="@string/disagree"
android:textColor="@color/red"/>
</RelativeLayout>
</LinearLayout> </LinearLayout>

View file

@ -26,7 +26,7 @@
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
tools:text="Loading name..." tools:text="Loading name..."
android:textAppearance="@style/TextAppearance.Body1" android:textAppearance="@style/TextAppearance.Crystal.Body1"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toEndOf="@id/ivContactThumbnail"/> app:layout_constraintStart_toEndOf="@id/ivContactThumbnail"/>

View file

@ -85,43 +85,30 @@
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<RelativeLayout
<LinearLayout
android:id="@+id/layoutBtns" android:id="@+id/layoutBtns"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="65dp" android:layout_height="wrap_content"
android:background="@android:color/white"
android:padding="4dp"
android:orientation="horizontal"
app:layout_constraintTop_toBottomOf="@+id/tilAccountName" app:layout_constraintTop_toBottomOf="@+id/tilAccountName"
android:layout_marginTop="60dp"> android:layout_marginTop="60dp"
android:layout_marginEnd="@dimen/activity_horizontal_margin">
<Button <com.google.android.material.button.MaterialButton
android:id="@+id/btnCancel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.50"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:theme="@style/RedButton"
android:textColor="@color/white"
android:textSize="14sp"
android:text="@string/cancel" />
<Button
android:id="@+id/btnCreate" android:id="@+id/btnCreate"
android:layout_width="match_parent" style="@style/Widget.Crystal.Button"
android:layout_height="match_parent" android:layout_width="wrap_content"
android:layout_weight="0.5" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_alignParentEnd="true"
android:layout_marginEnd="8dp" android:layout_marginBottom="4dp"
android:theme="@style/BlueButton" android:text="@string/create"/>
android:text="@string/create_wallet" <com.google.android.material.button.MaterialButton
android:textSize="14sp" android:id="@+id/btnCancel"
android:textColor="@color/white" /> style="@style/Widget.Crystal.Button.TextButton"
android:layout_width="wrap_content"
</LinearLayout> android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:layout_toStartOf="@id/btnCreate"
android:text="@android:string/cancel"/>
</RelativeLayout>
<cy.agorise.crystalwallet.util.BottomStatusBar <cy.agorise.crystalwallet.util.BottomStatusBar
android:id="@+id/bottomStatusBar" android:id="@+id/bottomStatusBar"

View file

@ -23,16 +23,13 @@
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"/> app:layout_constraintEnd_toEndOf="parent"/>
<Button <com.google.android.material.button.MaterialButton
android:id="@+id/btnUpgrade" android:id="@+id/btnUpgrade"
style="@style/Widget.Crystal.Button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
style="@style/Widget.Button"
android:text="@string/upgrade" android:text="@string/upgrade"
android:theme="@style/BlueButton"
android:textStyle="bold"
android:textColor="@color/white"
app:layout_constraintTop_toBottomOf="@id/tvUpgrade" app:layout_constraintTop_toBottomOf="@id/tvUpgrade"
app:layout_constraintStart_toStartOf="@id/tvUpgrade" /> app:layout_constraintStart_toStartOf="@id/tvUpgrade" />
@ -47,16 +44,13 @@
app:layout_constraintTop_toBottomOf="@id/btnUpgrade" app:layout_constraintTop_toBottomOf="@id/btnUpgrade"
app:layout_constraintEnd_toEndOf="@id/tvUpgrade"/> app:layout_constraintEnd_toEndOf="@id/tvUpgrade"/>
<Button <com.google.android.material.button.MaterialButton
android:id="@+id/btnImport" android:id="@+id/btnImport"
style="@style/Widget.Crystal.Button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
style="@style/Widget.Button"
android:text="@string/import_" android:text="@string/import_"
android:theme="@style/BlueButton"
android:textStyle="bold"
android:textColor="@color/white"
app:layout_constraintTop_toBottomOf="@id/tvImport" app:layout_constraintTop_toBottomOf="@id/tvImport"
app:layout_constraintStart_toStartOf="@id/btnUpgrade" /> app:layout_constraintStart_toStartOf="@id/btnUpgrade" />
@ -71,16 +65,13 @@
app:layout_constraintTop_toBottomOf="@id/btnImport" app:layout_constraintTop_toBottomOf="@id/btnImport"
app:layout_constraintEnd_toEndOf="@id/tvImport"/> app:layout_constraintEnd_toEndOf="@id/tvImport"/>
<Button <com.google.android.material.button.MaterialButton
android:id="@+id/btnRefresh" android:id="@+id/btnRefresh"
style="@style/Widget.Crystal.Button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
style="@style/Widget.Button"
android:text="@string/refresh" android:text="@string/refresh"
android:textStyle="bold"
android:theme="@style/BlueButton"
android:textColor="@color/white"
app:layout_constraintTop_toBottomOf="@id/tvRefresh" app:layout_constraintTop_toBottomOf="@id/tvRefresh"
app:layout_constraintStart_toStartOf="@id/btnImport" /> app:layout_constraintStart_toStartOf="@id/btnImport" />
@ -95,16 +86,14 @@
app:layout_constraintTop_toBottomOf="@id/btnRefresh" app:layout_constraintTop_toBottomOf="@id/btnRefresh"
app:layout_constraintEnd_toEndOf="@id/tvRefresh"/> app:layout_constraintEnd_toEndOf="@id/tvRefresh"/>
<Button <com.google.android.material.button.MaterialButton
android:id="@+id/btnRemove" android:id="@+id/btnRemove"
style="@style/Widget.Button" style="@style/Widget.Crystal.Button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:text="@string/remove" android:text="@string/remove"
android:theme="@style/RedButton" android:backgroundTint="@color/red"
android:textColor="@color/white"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="@id/btnRefresh" app:layout_constraintStart_toStartOf="@id/btnRefresh"
app:layout_constraintTop_toBottomOf="@id/tvRemove" /> app:layout_constraintTop_toBottomOf="@id/tvRemove" />

View file

@ -18,15 +18,13 @@
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"/> app:layout_constraintEnd_toEndOf="parent"/>
<Button <com.google.android.material.button.MaterialButton
android:id="@+id/btnBinFile" android:id="@+id/btnBinFile"
style="@style/Widget.Crystal.Button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:text="@string/create_a_backup" android:text="@string/create_a_backup"
android:theme="@style/BlueButton"
android:textStyle="bold"
android:textColor="@color/white"
app:layout_constraintTop_toBottomOf="@id/tvBinFile" app:layout_constraintTop_toBottomOf="@id/tvBinFile"
app:layout_constraintStart_toStartOf="@id/tvBinFile" /> app:layout_constraintStart_toStartOf="@id/tvBinFile" />
@ -41,15 +39,13 @@
app:layout_constraintStart_toStartOf="@id/tvBinFile" app:layout_constraintStart_toStartOf="@id/tvBinFile"
app:layout_constraintTop_toBottomOf="@id/btnBinFile" /> app:layout_constraintTop_toBottomOf="@id/btnBinFile" />
<Button <com.google.android.material.button.MaterialButton
android:id="@+id/btnBrainkey" android:id="@+id/btnBrainkey"
style="@style/Widget.Crystal.Button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:text="@string/view_and_copy" android:text="@string/view_and_copy"
android:theme="@style/BlueButton"
android:textColor="@color/white"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="@id/btnBinFile" app:layout_constraintStart_toStartOf="@id/btnBinFile"
app:layout_constraintTop_toBottomOf="@id/tvBrainkey" /> app:layout_constraintTop_toBottomOf="@id/tvBrainkey" />
@ -60,23 +56,19 @@
android:layout_marginTop="24dp" android:layout_marginTop="24dp"
android:text="@string/wif_key_description" android:text="@string/wif_key_description"
android:textSize="15sp" android:textSize="15sp"
android:visibility="invisible" android:visibility="gone"
app:layout_constraintEnd_toEndOf="@id/tvBrainkey" app:layout_constraintEnd_toEndOf="@id/tvBrainkey"
app:layout_constraintStart_toStartOf="@id/tvBrainkey" app:layout_constraintStart_toStartOf="@id/tvBrainkey"
app:layout_constraintTop_toBottomOf="@id/btnBrainkey" /> app:layout_constraintTop_toBottomOf="@id/btnBrainkey" />
<Button <com.google.android.material.button.MaterialButton
android:id="@+id/btnWIFKey" android:id="@+id/btnWIFKey"
style="@style/Widget.Button" style="@style/Widget.Crystal.Button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:background="@color/colorPrimary"
android:text="@string/view_and_copy" android:text="@string/view_and_copy"
android:theme="@style/BlueButton" android:visibility="gone"
android:textColor="@color/white"
android:textStyle="bold"
android:visibility="invisible"
app:layout_constraintStart_toStartOf="@id/btnBrainkey" app:layout_constraintStart_toStartOf="@id/btnBrainkey"
app:layout_constraintTop_toBottomOf="@id/tvWIFKey" /> app:layout_constraintTop_toBottomOf="@id/tvWIFKey" />

View file

@ -20,15 +20,14 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<Button <com.google.android.material.button.MaterialButton
android:id="@+id/btnUpgradeToLtm" android:id="@+id/btnUpgradeToLtm"
style="@style/Widget.Crystal.Button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginEnd="32dp" android:layout_marginEnd="32dp"
android:textColor="@color/black"
android:text="Upgrade" android:text="Upgrade"
android:theme="@style/WhiteButton"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/tvUpgradeToLtm" app:layout_constraintStart_toStartOf="@+id/tvUpgradeToLtm"
app:layout_constraintTop_toBottomOf="@id/tvUpgradeToLtm" /> app:layout_constraintTop_toBottomOf="@id/tvUpgradeToLtm" />

View file

@ -51,16 +51,15 @@
</LinearLayout> </LinearLayout>
<Button <com.google.android.material.button.MaterialButton
android:id="@+id/btnCopy" android:id="@+id/btnCopy"
style="@style/Widget.Crystal.Button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/linearlayout1" android:layout_below="@+id/linearlayout1"
android:layout_marginTop="25dp" android:layout_marginTop="25dp"
android:theme="@style/BlueButton"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:text="@string/window_seed_copy" android:text="@string/window_seed_copy"/>
android:textColor="@color/white"/>
</RelativeLayout> </RelativeLayout>

View file

@ -184,15 +184,13 @@
app:layout_constraintStart_toStartOf="@id/tvCloseWalletTimer" app:layout_constraintStart_toStartOf="@id/tvCloseWalletTimer"
app:layout_constraintTop_toBottomOf="@id/tvCloseWalletTimer"/> app:layout_constraintTop_toBottomOf="@id/tvCloseWalletTimer"/>
<Button <com.google.android.material.button.MaterialButton
android:id="@+id/btnContact" android:id="@+id/btnContact"
style="@style/Widget.Crystal.Button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="45dp" android:layout_height="45dp"
android:layout_marginTop="30dp" android:layout_marginTop="30dp"
android:text="CONTACT" android:text="CONTACT"
android:textColor="@color/white"
android:textStyle="bold"
android:theme="@style/BlueButton"
app:layout_constraintEnd_toEndOf="@id/sCloseWalletTimer" app:layout_constraintEnd_toEndOf="@id/sCloseWalletTimer"
app:layout_constraintTop_toBottomOf="@id/tvCloseWalletTimer" /> app:layout_constraintTop_toBottomOf="@id/tvCloseWalletTimer" />

View file

@ -21,50 +21,43 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<Button <com.google.android.material.button.MaterialButton
android:id="@+id/btnImportBackup" android:id="@+id/btnImportBackup"
style="@style/Widget.Crystal.Button"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="48dp" android:layout_marginTop="48dp"
android:background="@color/colorPrimary"
android:text="@string/import_account_backup" android:text="@string/import_account_backup"
android:textAllCaps="false" android:textAllCaps="false"
android:textColor="@color/white"
android:textSize="18sp" android:textSize="18sp"
android:theme="@style/BlueButton"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="@id/tvDescription" app:layout_constraintEnd_toEndOf="@id/tvDescription"
app:layout_constraintHorizontal_bias="0.0" app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@id/tvDescription" app:layout_constraintStart_toStartOf="@id/tvDescription"
app:layout_constraintTop_toBottomOf="@id/tvDescription" /> app:layout_constraintTop_toBottomOf="@id/tvDescription" />
<Button <com.google.android.material.button.MaterialButton
android:id="@+id/btnImportSeed" android:id="@+id/btnImportSeed"
style="@style/Widget.Crystal.Button"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="32dp" android:layout_marginTop="32dp"
android:background="@color/colorPrimary"
android:text="@string/import_account_seed" android:text="@string/import_account_seed"
android:textAllCaps="false" android:textAllCaps="false"
android:theme="@style/BlueButton"
android:textColor="@color/white"
android:textSize="18sp" android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@id/btnImportBackup" app:layout_constraintTop_toBottomOf="@id/btnImportBackup"
app:layout_constraintStart_toStartOf="@id/btnImportBackup" app:layout_constraintStart_toStartOf="@id/btnImportBackup"
app:layout_constraintEnd_toEndOf="@id/btnImportBackup"/> app:layout_constraintEnd_toEndOf="@id/btnImportBackup"/>
<Button <com.google.android.material.button.MaterialButton
android:id="@+id/btnCancel" android:id="@+id/btnCancel"
style="@style/Widget.Crystal.Button"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="59dp" android:layout_height="wrap_content"
android:layout_marginTop="22dp" android:layout_marginTop="22dp"
android:theme="@style/RedButton"
android:text="@string/dialog_cancel" android:text="@string/dialog_cancel"
android:textAllCaps="false" android:textAllCaps="false"
android:textColor="@color/white"
android:textSize="18sp" android:textSize="18sp"
android:textStyle="bold" android:backgroundTint="@color/red"
app:layout_constraintEnd_toEndOf="@id/btnImportSeed" app:layout_constraintEnd_toEndOf="@id/btnImportSeed"
app:layout_constraintStart_toStartOf="@id/btnImportSeed" app:layout_constraintStart_toStartOf="@id/btnImportSeed"
app:layout_constraintTop_toBottomOf="@id/btnImportSeed" /> app:layout_constraintTop_toBottomOf="@id/btnImportSeed" />

View file

@ -15,15 +15,14 @@
android:textAlignment="center" android:textAlignment="center"
android:layout_centerInParent="true"/> android:layout_centerInParent="true"/>
<Button <com.google.android.material.button.MaterialButton
android:id="@+id/btnOK" android:id="@+id/btnOK"
style="@style/Widget.Crystal.Button"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_below="@+id/txtFirst" android:layout_below="@+id/txtFirst"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:theme="@style/WhiteButton"
android:textColor="@color/black"
android:text="@string/ok"/> android:text="@string/ok"/>
</RelativeLayout> </RelativeLayout>

View file

@ -38,15 +38,14 @@
android:textColor="@color/red" android:textColor="@color/red"
android:layout_below="@+id/etConfirmPin" /> android:layout_below="@+id/etConfirmPin" />
<Button <com.google.android.material.button.MaterialButton
android:id="@+id/btnOK" android:id="@+id/btnOK"
style="@style/Widget.Crystal.Button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:theme="@style/WhiteButton"
android:text="@string/ok"
android:layout_below="@+id/etConfirmPin"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:textColor="@color/black" android:layout_centerHorizontal="true"
android:layout_centerHorizontal="true"/> android:text="@string/ok"
android:layout_below="@+id/etConfirmPin" />
</RelativeLayout> </RelativeLayout>

View file

@ -113,41 +113,30 @@
android:visibility="invisible" android:visibility="invisible"
android:layout_marginTop="5dp"/> android:layout_marginTop="5dp"/>
<RelativeLayout
<LinearLayout
android:id="@+id/linearlayoutButtons" android:id="@+id/linearlayoutButtons"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_below="@+id/txtErrorAccount" android:layout_below="@+id/txtErrorAccount"
android:orientation="horizontal"
android:layout_marginTop="10dp"> android:layout_marginTop="10dp">
<com.google.android.material.button.MaterialButton
<Button
android:id="@+id/btnCancel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="0.50"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:theme="@style/RedButton"
android:textColor="@color/white"
android:textSize="14sp"
android:text="@string/cancel" />
<Button
android:id="@+id/btnImport" android:id="@+id/btnImport"
android:layout_width="match_parent" style="@style/Widget.Crystal.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0.50" android:layout_alignParentEnd="true"
android:layout_marginEnd="8dp" android:layout_marginBottom="4dp"
android:layout_marginStart="8dp" android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:theme="@style/BlueButton" android:text="@string/import_"/>
android:text="@string/create_wallet" <com.google.android.material.button.MaterialButton
android:textSize="14sp" android:id="@+id/btnCancel"
android:textColor="@color/white" /> style="@style/Widget.Crystal.Button.TextButton"
android:layout_width="wrap_content"
</LinearLayout> android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:layout_toStartOf="@id/btnImport"
android:text="@string/cancel"/>
</RelativeLayout>
</RelativeLayout> </RelativeLayout>

View file

@ -70,7 +70,7 @@
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:maxLines="1" android:maxLines="1"
tools:text="denzel-washington" tools:text="denzel-washington"
android:textAppearance="@style/TextAppearance.Body2" android:textAppearance="@style/TextAppearance.Crystal.Body2"
android:textColor="@color/gray" android:textColor="@color/gray"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toEndOf="@id/firstVerticalGuideline" app:layout_constraintStart_toEndOf="@id/firstVerticalGuideline"
@ -93,7 +93,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="1" android:maxLines="1"
tools:text="joes-grocery-13" tools:text="joes-grocery-13"
android:textAppearance="@style/TextAppearance.Body2" android:textAppearance="@style/TextAppearance.Crystal.Body2"
android:textColor="@color/gray" android:textColor="@color/gray"
android:textAlignment="textEnd" android:textAlignment="textEnd"
app:layout_constraintTop_toTopOf="@id/tvFrom" app:layout_constraintTop_toTopOf="@id/tvFrom"
@ -145,7 +145,7 @@
android:maxLines="1" android:maxLines="1"
tools:text="02 Oct" tools:text="02 Oct"
android:textStyle="bold" android:textStyle="bold"
android:textAppearance="@style/TextAppearance.Body1" android:textAppearance="@style/TextAppearance.Crystal.Body1"
app:layout_constraintTop_toBottomOf="@id/llMemo" app:layout_constraintTop_toBottomOf="@id/llMemo"
app:layout_constraintStart_toEndOf="@id/firstVerticalGuideline" app:layout_constraintStart_toEndOf="@id/firstVerticalGuideline"
app:layout_constraintEnd_toStartOf="@id/centeredVerticalGuideline"/> app:layout_constraintEnd_toStartOf="@id/centeredVerticalGuideline"/>
@ -156,7 +156,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="1" android:maxLines="1"
tools:text="15:01:18 CET" tools:text="15:01:18 CET"
android:textAppearance="@style/TextAppearance.Body2" android:textAppearance="@style/TextAppearance.Crystal.Body2"
android:textColor="@color/gray" android:textColor="@color/gray"
app:layout_constraintTop_toBottomOf="@+id/tvDate" app:layout_constraintTop_toBottomOf="@+id/tvDate"
app:layout_constraintStart_toEndOf="@id/firstVerticalGuideline" app:layout_constraintStart_toEndOf="@id/firstVerticalGuideline"
@ -168,7 +168,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="1" android:maxLines="1"
tools:text="1234567.1234 BTS" tools:text="1234567.1234 BTS"
android:textAppearance="@style/TextAppearance.Body1" android:textAppearance="@style/TextAppearance.Crystal.Body1"
android:textStyle="bold" android:textStyle="bold"
android:textAlignment="textEnd" android:textAlignment="textEnd"
app:layout_constraintTop_toTopOf="@id/tvDate" app:layout_constraintTop_toTopOf="@id/tvDate"
@ -182,7 +182,7 @@
android:layout_marginBottom="16dp" android:layout_marginBottom="16dp"
android:maxLines="1" android:maxLines="1"
tools:text="4119.75 $" tools:text="4119.75 $"
android:textAppearance="@style/TextAppearance.Body2" android:textAppearance="@style/TextAppearance.Crystal.Body2"
android:textColor="@color/gray" android:textColor="@color/gray"
android:textAlignment="textEnd" android:textAlignment="textEnd"
app:layout_constraintTop_toBottomOf="@+id/tvCryptoAmount" app:layout_constraintTop_toBottomOf="@+id/tvCryptoAmount"

View file

@ -1,5 +1,5 @@
<resources> <resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar.Bridge">
<!-- Customize your theme here. --> <!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
@ -69,30 +69,16 @@
<item name="android:textAllCaps">true</item> <item name="android:textAllCaps">true</item>
</style> </style>
<style name="BaseButton" parent="Theme.AppCompat"> <style name="Widget.Crystal.Button" parent="Widget.MaterialComponents.Button">
<item name="android:textColor">@android:color/white</item> <item name="android:textColor">@android:color/white</item>
<item name="colorButtonNormal">@color/gray</item> <item name="android:stateListAnimator">@animator/button_state_list_anim</item>
<item name="android:buttonStyle">@style/Widget.AppCompat.Button.Colored</item>
</style> </style>
<style name="BlueButton" parent="BaseButton"> <style name="Widget.Crystal.Button.TextButton" parent="Widget.MaterialComponents.Button.TextButton">
<item name="colorAccent">@color/colorPrimary</item> <item name="android:textColor">?android:attr/colorPrimaryDark</item>
<item name="colorControlHighlight">@color/colorPrimaryDark</item>
</style>
<style name="WhiteButton" parent="BaseButton">
<item name="colorAccent">@color/white</item>
<item name="colorControlHighlight">@color/lightGray</item>
</style>
<style name="RedButton" parent="BaseButton">
<item name="colorAccent">@color/red</item>
<item name="colorControlHighlight">@color/redColor</item>
</style> </style>
<!-- Text styles --> <!-- Text styles -->
<style name="TextAppearance.Body1" parent="Base.TextAppearance.AppCompat.Body1" > <style name="TextAppearance.Crystal.Body1" parent="TextAppearance.MaterialComponents.Body1" />
<item name="android:textSize">16sp</item> <style name="TextAppearance.Crystal.Body2" parent="TextAppearance.MaterialComponents.Body2" />
</style>
<style name="TextAppearance.Body2" parent="Base.TextAppearance.AppCompat.Body2" />
</resources> </resources>