mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
引数追加
This commit is contained in:
parent
76734de987
commit
028ca6303a
|
@ -15,13 +15,18 @@ import android.view.ViewGroup;
|
|||
*/
|
||||
public class ComponentViewerTopFragment extends Fragment {
|
||||
|
||||
private static final String TAG = "ComponentViewerTopFragment";
|
||||
|
||||
private String documentId;
|
||||
|
||||
public ComponentViewerTopFragment() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
public static ComponentViewerTopFragment newInstance() {
|
||||
public static ComponentViewerTopFragment newInstance(String documentId) {
|
||||
ComponentViewerTopFragment fragment = new ComponentViewerTopFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putString("documentId", documentId);
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
@ -29,6 +34,9 @@ public class ComponentViewerTopFragment extends Fragment {
|
|||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (getArguments() != null) {
|
||||
documentId = getArguments().getString("documentId");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user