Search in sources :

Example 1 with AppPagerAdapter

use of io.virtualapp.home.adapters.AppPagerAdapter in project VirtualApp by asLody.

the class ListAppActivity method onCreate.

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getWindow().setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.colorPrimaryDark)));
    setContentView(R.layout.activity_clone_app);
    mToolBar = (Toolbar) findViewById(R.id.clone_app_tool_bar);
    mTabLayout = (TabLayout) mToolBar.findViewById(R.id.clone_app_tab_layout);
    mViewPager = (ViewPager) findViewById(R.id.clone_app_view_pager);
    setupToolBar();
    mViewPager.setAdapter(new AppPagerAdapter(getSupportFragmentManager()));
    mTabLayout.setupWithViewPager(mViewPager);
    // Request permission to access external storage
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
        if (ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
            ActivityCompat.requestPermissions(this, new String[] { Manifest.permission.READ_EXTERNAL_STORAGE }, 0);
        }
    }
}
Also used : ColorDrawable(android.graphics.drawable.ColorDrawable) AppPagerAdapter(io.virtualapp.home.adapters.AppPagerAdapter)

Aggregations

ColorDrawable (android.graphics.drawable.ColorDrawable)1 AppPagerAdapter (io.virtualapp.home.adapters.AppPagerAdapter)1