Back to project page coursera-android-001.
The source code is released under:
MIT License
If you think the Android project coursera-android-001 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 course.labs.fragmentslab; //from www.j a va 2s.c o m import android.app.Fragment; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; public class FeedFragment extends Fragment { private static final String TAG = "Lab-Fragments"; private TextView mTextView; private static FeedFragmentData feedFragmentData; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.feed, container, false); } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); // Read in all Twitter feeds if (null == feedFragmentData) { feedFragmentData = new FeedFragmentData(getActivity()); } } // Display Twitter feed for selected feed void updateFeedDisplay(int position) { Log.i(TAG, "Entered updateFeedDisplay()"); mTextView = (TextView) getView().findViewById(R.id.feed_view); mTextView.setText(feedFragmentData.getFeed(position)); } }