parent
f1b7d91325
commit
2579530af8
@ -1,63 +0,0 @@ |
||||
package io.legado.app.ui.main |
||||
|
||||
import android.view.View |
||||
import androidx.databinding.ViewDataBinding |
||||
|
||||
class MainDataBinding(bindingComponent: Any?, root: View?, localFieldCount: Int) : |
||||
ViewDataBinding(bindingComponent, root, localFieldCount) { |
||||
/** |
||||
* Set a value value in the Binding class. |
||||
* |
||||
* |
||||
* Typically, the developer will be able to call the subclass's set method directly. For |
||||
* example, if there is a variable `x` in the Binding, a `setX` method |
||||
* will be generated. However, there are times when the specific subclass of ViewDataBinding |
||||
* is unknown, so the generated method cannot be discovered without reflection. The |
||||
* setVariable call allows the values of variables to be set without reflection. |
||||
* |
||||
* @param variableId the BR id of the variable to be set. For example, if the variable is |
||||
* `x`, then variableId will be `BR.x`. |
||||
* @param value The new value of the variable to be set. |
||||
* @return `true` if the variable is declared or used in the binding or |
||||
* `false` otherwise. |
||||
*/ |
||||
override fun setVariable(variableId: Int, value: Any?): Boolean { |
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates. |
||||
} |
||||
|
||||
/** |
||||
* @hide |
||||
*/ |
||||
override fun executeBindings() { |
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates. |
||||
} |
||||
|
||||
/** |
||||
* Called when an observed object changes. Sets the appropriate dirty flag if applicable. |
||||
* @param localFieldId The index into mLocalFieldObservers that this Object resides in. |
||||
* @param object The object that has changed. |
||||
* @param fieldId The BR ID of the field being changed or _all if |
||||
* no specific field is being notified. |
||||
* @return true if this change should cause a change to the UI. |
||||
* @hide |
||||
*/ |
||||
override fun onFieldChange(localFieldId: Int, `object`: Any?, fieldId: Int): Boolean { |
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates. |
||||
} |
||||
|
||||
/** |
||||
* Invalidates all binding expressions and requests a new rebind to refresh UI. |
||||
*/ |
||||
override fun invalidateAll() { |
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates. |
||||
} |
||||
|
||||
/** |
||||
* Returns whether the UI needs to be refresh to represent the current data. |
||||
* |
||||
* @return true if any field has changed and the binding should be evaluated. |
||||
*/ |
||||
override fun hasPendingBindings(): Boolean { |
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates. |
||||
} |
||||
} |
@ -1,26 +1,29 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<androidx.drawerlayout.widget.DrawerLayout |
||||
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:id="@+id/drawer_layout" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:fitsSystemWindows="true" |
||||
tools:openDrawer="start"> |
||||
|
||||
<include |
||||
layout="@layout/app_bar_main" |
||||
<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"> |
||||
<data class=".ui.main.MainDataBinding"> |
||||
<variable name="MainViewModel" type="io.legado.app.ui.main.MainViewModel"/> |
||||
</data> |
||||
<androidx.drawerlayout.widget.DrawerLayout |
||||
android:id="@+id/drawer_layout" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent"/> |
||||
|
||||
<com.google.android.material.navigation.NavigationView |
||||
android:id="@+id/nav_view" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="match_parent" |
||||
android:layout_gravity="start" |
||||
android:fitsSystemWindows="true" |
||||
app:headerLayout="@layout/nav_header_main" |
||||
app:menu="@menu/activity_main_drawer"/> |
||||
tools:openDrawer="start"> |
||||
|
||||
<include |
||||
layout="@layout/app_bar_main" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent"/> |
||||
|
||||
<com.google.android.material.navigation.NavigationView |
||||
android:id="@+id/nav_view" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="match_parent" |
||||
android:layout_gravity="start" |
||||
android:fitsSystemWindows="true" |
||||
app:headerLayout="@layout/nav_header_main" |
||||
app:menu="@menu/activity_main_drawer"/> |
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout> |
||||
</androidx.drawerlayout.widget.DrawerLayout> |
||||
</layout> |
||||
|
Loading…
Reference in new issue