Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.test.fragmentchildissue;
- import android.os.Bundle;
- import android.support.v4.app.Fragment;
- import android.view.LayoutInflater;
- import android.view.View;
- import android.view.ViewGroup;
- import android.widget.TextView;
- public class ChildFragment extends Fragment {
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- View view = null;
- try {
- view = inflater.inflate(R.layout.layout_childfragment, container,
- false);
- Bundle bundle = getArguments();
- final String text = bundle.getString("text");
- TextView textView = (TextView) view.findViewById(R.id.textView1);
- textView.setText(text);
- } catch (Exception e) {
- e.printStackTrace();
- }
- return view;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement