Update: Migrate from viewBinding to dataBinding

This commit is contained in:
machiav3lli 2021-12-13 02:53:34 +01:00
parent 758649c8c2
commit 011cf6a41f
14 changed files with 747 additions and 662 deletions

View File

@ -77,7 +77,7 @@ android {
def keystorePropertiesFile = rootProject.file('keystore.properties')
buildFeatures {
viewBinding true
dataBinding true
}
if (keystorePropertiesFile.exists()) {
def keystoreProperties = new Properties()

View File

@ -1,6 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
</data>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true">
@ -125,3 +131,4 @@
</androidx.appcompat.widget.LinearLayoutCompat>
</FrameLayout>
</layout>

View File

@ -1,6 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
</data>
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?colorSurface">
@ -41,3 +47,4 @@
app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:shapeAppearanceOverlay="@style/Shape.BottomSheet" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>

View File

@ -1,7 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
</data>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="12dp"
@ -239,3 +244,4 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/status_layout" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -1,6 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
</data>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
@ -41,3 +47,4 @@
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</layout>

View File

@ -1,6 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
</data>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
@ -29,3 +35,4 @@
android:textSize="16sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
</layout>

View File

@ -1,5 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
</data>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
@ -35,5 +41,5 @@
android:clickable="false"
android:paddingHorizontal="12dp"
android:visibility="gone" />
</androidx.appcompat.widget.LinearLayoutCompat>
</layout>

View File

@ -1,7 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
<layout 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"
xmlns:tools="http://schemas.android.com/tools">
<data>
</data>
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="72dp">
@ -57,9 +63,7 @@
android:singleLine="true"
android:textAppearance="?textAppearanceBody2"
android:textColor="?android:attr/textColorSecondary" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</com.google.android.material.card.MaterialCardView>
</layout>

View File

@ -1,5 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
</data>
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -97,3 +103,4 @@
</androidx.appcompat.widget.LinearLayoutCompat>
</com.google.android.material.card.MaterialCardView>
</layout>

View File

@ -1,10 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
</data>
<com.google.android.material.card.MaterialCardView
android:id="@+id/repository_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="8dp"
android:layout_marginHorizontal="@dimen/text_margin">
android:layout_marginHorizontal="@dimen/text_margin"
android:layout_marginVertical="8dp">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
@ -34,3 +40,4 @@
android:layout_gravity="end"
android:layout_marginEnd="24dp" />
</com.google.android.material.card.MaterialCardView>
</layout>

View File

@ -1,6 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
</data>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
@ -23,3 +29,4 @@
tools:ignore="ContentDescription" />
</androidx.appcompat.widget.LinearLayoutCompat>
</layout>

View File

@ -1,9 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.switchmaterial.SwitchMaterial xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
</data>
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/update_state_switch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="false"
android:layout_marginHorizontal="@dimen/text_margin"
android:clickable="false"
android:singleLine="true"
android:textSize="15sp" />
</layout>

View File

@ -1,15 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
</data>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabs"
android:backgroundTint="?attr/colorSurface"
android:layout_width="match_parent"
android:layout_height="48dp" />
android:layout_height="48dp"
android:backgroundTint="?attr/colorSurface" />
<com.google.android.material.circularreveal.CircularRevealFrameLayout
android:id="@+id/section_layout"
@ -49,3 +55,4 @@
</com.google.android.material.circularreveal.CircularRevealFrameLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
</layout>

View File

@ -1,5 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
</data>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
@ -19,5 +25,5 @@
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:textSize="16sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
</layout>