SHARE
TWEET

Untitled

a guest Jun 26th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.dicoding.picodiploma.submission4.viewmodel;
  2.  
  3. import android.app.Application;
  4.  
  5. import androidx.annotation.NonNull;
  6. import androidx.lifecycle.AndroidViewModel;
  7. import androidx.lifecycle.LiveData;
  8.  
  9. import com.dicoding.picodiploma.submission4.db.tvshowdb.TvShowHelper;
  10. import com.dicoding.picodiploma.submission4.models.tvshowmodels.TvShowResults;
  11.  
  12. import java.util.List;
  13.  
  14. public class TvShowFavoriteViewModel extends AndroidViewModel {
  15.     LiveData<List<TvShowResults>> getCurrentData;
  16.     TvShowHelper tvShowHelper;
  17.     TvShowResults tvShowResults;
  18.     public TvShowFavoriteViewModel(@NonNull Application application) {
  19.         super(application);
  20.         tvShowHelper = TvShowHelper.getInstance(application);
  21.  
  22.         getCurrentData = tvShowHelper.getAllTv();
  23.  
  24.     }
  25.  
  26.     public LiveData<List<TvShowResults>> getTvData() {
  27.         return getCurrentData;
  28.     }
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top