Search in sources :

Example 1 with PresentationHelper

use of com.commonsware.cwac.preso.PresentationHelper in project cw-omnibus by commonsguy.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    preso = PresoRoster.getInstance().getPresoById(getIntent().getIntExtra(EXTRA_PRESO_ID, 0));
    setContentView(R.layout.activity_main);
    pager = (ViewPager) findViewById(R.id.pager);
    helper = new PresentationHelper(this, this);
    selector = new MediaRouteSelector.Builder().addControlCategory(MediaControlIntent.CATEGORY_REMOTE_PLAYBACK).build();
    router = MediaRouter.getInstance(this);
    router.addCallback(selector, routeCB, MediaRouter.CALLBACK_FLAG_REQUEST_DISCOVERY);
    if (isDirectToTV()) {
        getSupportActionBar().hide();
    }
    setupPager();
}
Also used : MediaRouteSelector(android.support.v7.media.MediaRouteSelector) PresentationHelper(com.commonsware.cwac.preso.PresentationHelper)

Example 2 with PresentationHelper

use of com.commonsware.cwac.preso.PresentationHelper in project cw-omnibus by commonsguy.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    TabPageIndicator tabs = (TabPageIndicator) findViewById(R.id.titles);
    pager = (ViewPager) findViewById(R.id.pager);
    adapter = new SlidesAdapter(this);
    pager.setAdapter(adapter);
    tabs.setViewPager(pager);
    tabs.setOnPageChangeListener(this);
    helper = new PresentationHelper(this, this);
}
Also used : TabPageIndicator(com.viewpagerindicator.TabPageIndicator) PresentationHelper(com.commonsware.cwac.preso.PresentationHelper)

Example 3 with PresentationHelper

use of com.commonsware.cwac.preso.PresentationHelper in project cw-omnibus by commonsguy.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    helper = new PresentationHelper(this, this);
}
Also used : PresentationHelper(com.commonsware.cwac.preso.PresentationHelper)

Aggregations

PresentationHelper (com.commonsware.cwac.preso.PresentationHelper)3 MediaRouteSelector (android.support.v7.media.MediaRouteSelector)1 TabPageIndicator (com.viewpagerindicator.TabPageIndicator)1