Android Open Source - Fragment-NetEase Contentfragment






From Project

Back to project page Fragment-NetEase.

License

The source code is released under:

Apache License

If you think the Android project Fragment-NetEase listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package fragment_content;
//w  w w.  ja va  2  s  . c o  m
import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.gracker.tabfragment.R;

public class Contentfragment extends Fragment {

    TextView mTextView; // ?????

    @Override
    public void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
    }

    @Override
    public void onDestroy() {
        // TODO Auto-generated method stub
        super.onDestroy();
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // super.onCreateView(inflater, container, savedInstanceState);
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_content, container, false);
    }

    public void changeContent(int index) {
        mTextView = (TextView) getActivity().findViewById(
                R.id.fragment_context_context);
        switch (index) {
            case 0:
                mTextView.setText(R.string.news_top_left_text);
                break;
            case 1:
                mTextView.setText(R.string.topic_top_left_text);
                break;
            case 2:
                mTextView.setText(R.string.picture_top_left_text);
                break;
            case 3:
                mTextView.setText(R.string.follow_top_left_text);
                break;
            case 4:
                mTextView.setText(R.string.vote_top_left_text);
                break;
            default:
                break;
        }
    }

}




Java Source Code List

com.and.netease.utils.MoveBg.java
com.gracker.tabfragment.MainActivity.java
fragment_content.Contentfragment.java
fragment_content.TopBarFragment.java