use of flying.grub.tamtime.slidingTab.SlidingTabLayout in project TamTime by flyingrub.
the class OneStopActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_slidingtabs);
Bundle bundle = getIntent().getExtras();
stop_zone_id = bundle.getInt("stop_zone_id");
stop = Data.getData().getMap().getStopZoneById(stop_zone_id);
toolbar = (Toolbar) findViewById(R.id.toolbar_actionbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayShowTitleEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setTitle(stop.getName());
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
viewPager = (ViewPager) findViewById(R.id.viewpager);
viewPager.setAdapter(new OneStopPageAdapter(getSupportFragmentManager()));
favoriteStops = new FavoriteStops(getApplicationContext());
favoriteStopLine = new FavoriteStopLine(getApplicationContext());
slidingTabLayout = new SlidingTabLayout(getApplicationContext());
slidingTabLayout = (SlidingTabLayout) findViewById(R.id.sliding_tabs);
slidingTabLayout.setSelectedIndicatorColors(getResources().getColor(R.color.textClearColor));
slidingTabLayout.setDividerColors(getResources().getColor(R.color.primaryColor));
slidingTabLayout.setViewPager(viewPager);
}
use of flying.grub.tamtime.slidingTab.SlidingTabLayout in project TamTime by flyingrub.
the class OneLineActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_slidingtabs);
Bundle bundle = getIntent().getExtras();
linePosition = bundle.getInt("id");
toolbar = (Toolbar) findViewById(R.id.toolbar_actionbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayShowTitleEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
line = Data.getData().getMap().getLine(linePosition);
viewPager = (ViewPager) findViewById(R.id.viewpager);
viewPager.setAdapter(new OneLinePageAdapter(getSupportFragmentManager()));
slidingTabLayout = new SlidingTabLayout(getApplicationContext());
slidingTabLayout = (SlidingTabLayout) findViewById(R.id.sliding_tabs);
slidingTabLayout.setSelectedIndicatorColors(getResources().getColor(R.color.textClearColor));
slidingTabLayout.setDividerColors(getResources().getColor(R.color.primaryColor));
slidingTabLayout.setViewPager(viewPager);
Log.d(TAG, line.getDisruptEventList() + "");
if (line.getDisruptEventList().size() > 0) {
showInfo(line.getDisruptEventList().get(0).toString());
}
if (linePosition > 19) {
// createAskDialog();
}
}
Aggregations