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