Search in sources :

Example 1 with SettingsParamsBuilder

use of com.zype.android.webapi.builder.SettingsParamsBuilder in project zype-android by zype.

the class LaunchActivity method onResume.

@Override
protected void onResume() {
    super.onResume();
    SettingsParamsBuilder settingsParamsBuilder = new SettingsParamsBuilder();
    getApi().executeRequest(WebApiManager.Request.GET_SETTINGS, settingsParamsBuilder.build());
}
Also used : LiveStreamSettingsParamsBuilder(com.zype.android.webapi.builder.LiveStreamSettingsParamsBuilder) SettingsParamsBuilder(com.zype.android.webapi.builder.SettingsParamsBuilder)

Example 2 with SettingsParamsBuilder

use of com.zype.android.webapi.builder.SettingsParamsBuilder in project zype-android by zype.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    SectionsPagerAdapter mSectionsPagerAdapter = new SectionsPagerAdapter(this, getSupportFragmentManager());
    ViewPager mViewPager = (ViewPager) findViewById(R.id.pager);
    mViewPager.setAdapter(mSectionsPagerAdapter);
    TabLayout tabLayout = (TabLayout) findViewById(R.id.tabs);
    tabLayout.setupWithViewPager(mViewPager);
    for (int i = 0; i < tabLayout.getTabCount(); i++) {
        TabLayout.Tab tab = tabLayout.getTabAt(i);
        tab.setCustomView(mSectionsPagerAdapter.getTabView(i));
    }
    SettingsParamsBuilder settingsParamsBuilder = new SettingsParamsBuilder();
    getApi().executeRequest(WebApiManager.Request.GET_SETTINGS, settingsParamsBuilder.build());
    if (ZypeConfiguration.isNativeSubscriptionEnabled(this)) {
        new BillingManager(this, this);
    }
}
Also used : SettingsParamsBuilder(com.zype.android.webapi.builder.SettingsParamsBuilder) TabLayout(android.support.design.widget.TabLayout) BillingManager(com.zype.android.Billing.BillingManager) ViewPager(android.support.v4.view.ViewPager)

Aggregations

SettingsParamsBuilder (com.zype.android.webapi.builder.SettingsParamsBuilder)2 TabLayout (android.support.design.widget.TabLayout)1 ViewPager (android.support.v4.view.ViewPager)1 BillingManager (com.zype.android.Billing.BillingManager)1 LiveStreamSettingsParamsBuilder (com.zype.android.webapi.builder.LiveStreamSettingsParamsBuilder)1