-5
한 조각에서 다른 조각으로 문자열 또는 문자열 배열을 전달하는 메서드가 있습니다. 하나의 조각에서 다른 조각으로 문자열 개체를 전달하는 방법은 무엇입니까?한 조각에서 다른 조각으로 안드로이드 문자열 개체를 전달하는 방법?
한 조각에서 다른 조각으로 문자열 또는 문자열 배열을 전달하는 메서드가 있습니다. 하나의 조각에서 다른 조각으로 문자열 개체를 전달하는 방법은 무엇입니까?한 조각에서 다른 조각으로 안드로이드 문자열 개체를 전달하는 방법?
조각에서 문자열을 보내기
다른 조각에받을 방법DiagnosticListFragment fragmentS1 = new DiagnosticListFragment();
FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
Bundle bundle = new Bundle();
bundle.putString(Constants.BundleConstants.USER_ID,user_id);
fragmentS1.setArguments(bundle);
// Store the Fragment in stack
transaction.addToBackStack(null);
transaction.replace(R.id.fragment_parent, fragmentS1).commit();
:
final Bundle bundle = getArguments();
String user_id;
if(bundle != null) {
user_id = user_id = bundle.getString(Constants.BundleConstants.USER_ID);
}