Android Open Source - android-viewpager-indicator Line Tab Activity






From Project

Back to project page android-viewpager-indicator.

License

The source code is released under:

MIT License

If you think the Android project android-viewpager-indicator 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 me.caiying.indicator.demo;
/*from  w ww.j  a  va  2  s  .  c o  m*/
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.view.ViewPager;

import me.caiying.indicator.LineTabIndicator;
import me.caiying.indicator.R;

public class LineTabActivity extends FragmentActivity {
    private LineTabIndicator lineTabIndicator;
    private ViewPager viewPager;

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.activity_line_tab);
        lineTabIndicator = (LineTabIndicator) findViewById(R.id.line_tab_indicator);
        viewPager = (ViewPager) findViewById(R.id.view_pager);
        viewPager.setAdapter(new SampleFragmentPagerAdapter(this, getSupportFragmentManager()));
        lineTabIndicator.setViewPager(viewPager);
    }
}




Java Source Code List

me.caiying.indicator.FadeTabIndicator.java
me.caiying.indicator.LineTabIndicator.java
me.caiying.indicator.demo.ApiDemos.java
me.caiying.indicator.demo.FadeTabActivity.java
me.caiying.indicator.demo.LineTabActivity.java
me.caiying.indicator.demo.SampleFragmentPagerAdapter.java
me.caiying.indicator.demo.SampleFragment.java