- The Transaction List is now paged!

master
Javier Varona 2017-09-18 22:02:15 -04:00
parent c64e437ccf
commit 09b6f75a1f
2 changed files with 22 additions and 2 deletions

View File

@ -5,6 +5,7 @@ import android.arch.paging.PagedListAdapter;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ListView;
import android.widget.RelativeLayout;
@ -21,15 +22,34 @@ import cy.agorise.crystalwallet.viewmodels.TransactionListViewModel;
public class TransactionListView extends RelativeLayout {
LayoutInflater mInflater;
View rootView;
RecyclerView listView;
TransactionListAdapter listAdapter;
TransactionListViewModel transactionListViewModel;
public TransactionListView(Context context){
super(context);
this.mInflater = LayoutInflater.from(context);
init();
}
public TransactionListView(Context context, AttributeSet attrs) {
super(context, attrs);
rootView = inflate(context, R.layout.transaction_list, this);
this.mInflater = LayoutInflater.from(context);
init();
}
public TransactionListView(Context context, AttributeSet attrs, int defStyle){
super(context, attrs, defStyle);
this.mInflater = LayoutInflater.from(context);
init();
}
public void init(){
rootView = mInflater.inflate(R.layout.transaction_list, this, true);
this.listView = rootView.findViewById(R.id.transactionListView);
}

View File

@ -3,7 +3,7 @@
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<RecyclerView
<android.support.v7.widget.RecyclerView
android:id="@+id/transactionListView"
android:layout_width="match_parent"
android:layout_height="match_parent" />