mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
Factoryメソッド実装
This commit is contained in:
parent
e6cdba337e
commit
2812b02ba2
|
@ -36,13 +36,30 @@ public class ViewerBodyFragment extends Fragment {
|
||||||
@Inject
|
@Inject
|
||||||
LacertaVcsFactory lacertaVcsFactory;
|
LacertaVcsFactory lacertaVcsFactory;
|
||||||
|
|
||||||
|
// Variables
|
||||||
|
private String documentId;
|
||||||
|
private String documentName;
|
||||||
|
private String revisionId;
|
||||||
|
|
||||||
public ViewerBodyFragment() {
|
public ViewerBodyFragment() {
|
||||||
// Required empty public constructor
|
// Required empty public constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ViewerBodyFragment newInstance() {
|
public static ViewerBodyFragment newInstance(String documentId, String documentName) {
|
||||||
ViewerBodyFragment fragment = new ViewerBodyFragment();
|
ViewerBodyFragment fragment = new ViewerBodyFragment();
|
||||||
Bundle args = new Bundle();
|
Bundle args = new Bundle();
|
||||||
|
args.putString("documentId", documentId);
|
||||||
|
args.putString("documentName", documentName);
|
||||||
|
fragment.setArguments(args);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ViewerBodyFragment newInstance(String documentId, String documentName, String revisionId) {
|
||||||
|
ViewerBodyFragment fragment = new ViewerBodyFragment();
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
args.putString("documentId", documentId);
|
||||||
|
args.putString("documentName", documentName);
|
||||||
|
args.putString("revisionId", revisionId);
|
||||||
fragment.setArguments(args);
|
fragment.setArguments(args);
|
||||||
return fragment;
|
return fragment;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user