Android Open Source - ActionBarViewPager Dummy Fragment






From Project

Back to project page ActionBarViewPager.

License

The source code is released under:

Apache License

If you think the Android project ActionBarViewPager 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 com.example.actionbarviewpager;
// ww  w.j a v  a 2 s  .c o  m
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class DummyFragment extends Fragment {
    public static final String ARG_SECTION_NUMBER = "section_number";
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
        TextView textView = new TextView(getActivity());
        textView.setGravity(Gravity.CENTER_HORIZONTAL);
        Bundle args = getArguments();
        textView.setText(args.getInt(ARG_SECTION_NUMBER) + "");
        textView.setTextSize(30);
        return textView;
    }
}




Java Source Code List

com.example.actionbarviewpager.DummyFragment.java
com.example.actionbarviewpager.MainActivity.java