-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathimprovement-thoughts
More file actions
27 lines (22 loc) · 822 Bytes
/
improvement-thoughts
File metadata and controls
27 lines (22 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@EmptyPublicConstructor // <- MVP
@NewInstance(WalletViewHolder.WalletViewObject.class) // 2nd target
public class WalletDetailsFragment extends BaseFragment implements DetailsView {
private static final String WALLET = "WALLET";
@SuppressWarnings("WeakerAccess")
@InjectPresenter
DetailsPresenter presenter;
private ViewGroup actionsContainer;
private String currentCurrency;
public WalletDetailsFragment() { // to avoid this (simply generate)
// Empty constructor.
}
public static WalletDetailsFragment newInstance( // and this
@NonNull WalletViewHolder.WalletViewObject wallet) {
Bundle data = new Bundle();
data.putSerializable(WALLET, wallet);
WalletDetailsFragment fragment = new WalletDetailsFragment();
fragment.setArguments(data);
return fragment;
}
...
}