package net.ktnx.mobileledger.ui;
-import android.arch.lifecycle.ViewModel;
import android.support.v4.app.Fragment;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.RecyclerView;
import net.ktnx.mobileledger.ui.transaction_list.TransactionListAdapter;
public class MobileLedgerListFragment extends Fragment {
- public ViewModel model;
protected MainActivity mActivity;
public SwipeRefreshLayout swiper;
protected RecyclerView root;
package net.ktnx.mobileledger.ui.transaction_list;
-import android.arch.lifecycle.ViewModelProviders;
import android.content.Context;
import android.database.MatrixCursor;
import android.os.Bundle;
root = mActivity.findViewById(R.id.transaction_root);
if (root == null)
throw new RuntimeException("Can't get hold on the transaction value view");
- model = ViewModelProviders.of(this).get(TransactionListViewModel.class);
modelAdapter = new TransactionListAdapter();
modelAdapter.setBoldAccountName(mShowOnlyAccountName);