Upgrade to AndroidX, move to MaterialComponents theme (#953)

* upgrade to AndroidX, upgrade libraries

* move to MaterialComponents theme

* make sure the compose button looks good everywhere

* fix tollbar title/button alignment on tablet

* move to new material color theming, consolidate colors and themes

* fix build, fix imports

* set error on TextInputLayout instead of EditText

* fix imports, TootButton when

* improve snackbar style

* fix task description color
This commit is contained in:
Konrad Pozniak 2018-12-17 15:25:35 +01:00 committed by GitHub
commit a445c12094
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
179 changed files with 862 additions and 866 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
@ -8,7 +8,7 @@
<include layout="@layout/toolbar_basic" />
<android.support.v4.widget.NestedScrollView
<androidx.core.widget.NestedScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -86,56 +86,60 @@
</RelativeLayout>
<android.support.design.widget.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
style="@style/TuskyTextInput"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp">
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:hint="@string/hint_display_name">
<android.support.design.widget.TextInputEditText
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/displayNameEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:hint="@string/hint_display_name"
android:importantForAutofill="no" />
android:importantForAutofill="no"
android:lines="1" />
</android.support.design.widget.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<android.support.design.widget.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
style="@style/TuskyTextInput"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp">
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="8dp"
android:hint="@string/hint_note">
<android.support.design.widget.TextInputEditText
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/noteEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:hint="@string/hint_note"
android:importantForAutofill="no" />
</android.support.design.widget.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<android.support.v7.widget.AppCompatCheckBox
<CheckBox
android:id="@+id/lockedCheckBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="16dp"
android:paddingStart="8dp"
android:text="@string/lock_account_label"
android:textSize="?attr/status_text_medium" />
android:textSize="?attr/status_text_medium"
app:buttonTint="?attr/compound_button_color" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="24dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="24dp"
android:paddingStart="40dp"
android:text="@string/lock_account_label_description"
android:textSize="?attr/status_text_small" />
@ -143,13 +147,13 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="8dp"
android:text="@string/profile_metadata_label"
android:textSize="?attr/status_text_small" />
<android.support.v7.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/fieldList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -158,12 +162,13 @@
<Button
android:id="@+id/addFieldButton"
style="@style/TuskyButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:drawablePadding="6dp"
android:text="@string/profile_metadata_add"
android:textColor="#fff" />
@ -171,7 +176,7 @@
</LinearLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</androidx.core.widget.NestedScrollView>
<ProgressBar
android:id="@+id/saveProgressBar"
@ -181,4 +186,4 @@
android:indeterminate="true"
android:visibility="gone" />
</android.support.design.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>