Search in sources :

Example 16 with ViewModelAdapter

use of com.simplecityapps.recycler_adapter.adapter.ViewModelAdapter in project Shuttle by timusus.

the class FolderFragment method onCreate.

@Override
public void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    disposables = new CompositeDisposable();
    adapter = new ViewModelAdapter();
    fileBrowser = new FileBrowser(settingsManager);
    if (savedInstanceState != null) {
        currentDir = savedInstanceState.getString(ARG_CURRENT_DIR);
    }
    displayedInTabs = getArguments().getBoolean(ARG_DISPLAYED_IN_TABS);
    if (displayedInTabs) {
        setHasOptionsMenu(true);
    }
}
Also used : FileBrowser(com.simplecity.amp_library.utils.FileBrowser) CompositeDisposable(io.reactivex.disposables.CompositeDisposable) ViewModelAdapter(com.simplecityapps.recycler_adapter.adapter.ViewModelAdapter)

Aggregations

ViewModelAdapter (com.simplecityapps.recycler_adapter.adapter.ViewModelAdapter)16 RecyclerView (android.support.v7.widget.RecyclerView)7 ViewModel (com.simplecityapps.recycler_adapter.model.ViewModel)7 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)5 R (com.simplecity.amp_library.R)5 List (java.util.List)5 LayoutInflater (android.view.LayoutInflater)4 View (android.view.View)4 FragmentModule (com.simplecity.amp_library.dagger.module.FragmentModule)4 Observable (io.reactivex.Observable)4 SuppressLint (android.annotation.SuppressLint)3 Context (android.content.Context)3 MaterialDialog (com.afollestad.materialdialogs.MaterialDialog)3 Stream (com.annimon.stream.Stream)3 Bundle (android.os.Bundle)2 GridLayoutManager (android.support.v7.widget.GridLayoutManager)2 PagerSnapHelper (android.support.v7.widget.PagerSnapHelper)2 SnapHelper (android.support.v7.widget.SnapHelper)2 ViewGroup (android.view.ViewGroup)2 ViewTreeObserver (android.view.ViewTreeObserver)2