Back to project page AndroidFileBroadcast.
The source code is released under:
Apache License
If you think the Android project AndroidFileBroadcast listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.bucketdevelopers.uft; // ww w . j a va 2 s.c o m 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 MyFragment extends Fragment { public static final String EXTRA_MESSAGE = "EXTRA_MESSAGE"; public static final MyFragment newInstance(String message) { MyFragment f = new MyFragment(); Bundle bdl = new Bundle(1); bdl.putString(EXTRA_MESSAGE, message); f.setArguments(bdl); return f; } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { String message = getArguments().getString(EXTRA_MESSAGE); View v = inflater.inflate(R.layout.fragment_layout, container, false); TextView messageTextView = (TextView) v.findViewById(R.id.textView); messageTextView.setText(message); return v; } }