This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<layout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto"> | |
<data> | |
<import type="com.example.recyclerviewsqliteroomcrud.persistance.NotesModel"/> | |
<variable | |
name="itemModel" | |
type="NotesModel" /> | |
</data> | |
<androidx.cardview.widget.CardView |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.recyclerviewsqliteroomcrud.di; | |
import android.app.Application; | |
import android.content.Context; | |
import com.example.recyclerviewsqliteroomcrud.persistance.NotesRepository; | |
import javax.inject.Singleton; | |
import dagger.Module; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.recyclerviewsqliteroomcrud.di; | |
import androidx.lifecycle.ViewModel; | |
import com.example.recyclerviewsqliteroomcrud.view.MainActivityVM; | |
import dagger.Binds; | |
import dagger.Module; | |
import dagger.multibindings.IntoMap; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.recyclerviewsqliteroomcrud.di; | |
import androidx.lifecycle.ViewModel; | |
import java.lang.annotation.Documented; | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.recyclerviewsqliteroomcrud.di; | |
import com.example.recyclerviewsqliteroomcrud.view.MainActivity; | |
import dagger.Module; | |
import dagger.android.ContributesAndroidInjector; | |
@Module | |
public abstract class ActivityModule { | |
@ContributesAndroidInjector |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<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" | |
tools:context=".view.MainActivity"> | |
<data> | |
<variable | |
name="viewModel" | |
type="com.example.recyclerviewsqliteroomcrud.view.MainActivityVM" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.recyclerviewsqliteroomcrud; | |
import android.os.Bundle; | |
import androidx.annotation.LayoutRes; | |
import androidx.annotation.Nullable; | |
import androidx.appcompat.app.AppCompatActivity; | |
import androidx.databinding.DataBindingUtil; | |
import androidx.databinding.ViewDataBinding; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.recyclerviewsqliteroomcrud; | |
import androidx.lifecycle.ViewModel; | |
import com.example.recyclerviewsqliteroomcrud.persistance.NotesRepository; | |
public abstract class BaseViewModel extends ViewModel { | |
private final NotesRepository mNotesRepository; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.recyclerviewsqliteroomcrud.view; | |
import com.example.recyclerviewsqliteroomcrud.BaseViewModel; | |
import com.example.recyclerviewsqliteroomcrud.persistance.NotesRepository; | |
import javax.inject.Inject; | |
public class MainActivityVM extends BaseViewModel { | |
final NotesRepository mNotesRepository; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BaseViewModel |