use of com.manan.dev.ec2018app.Adapters.DashboardSlideAdapter in project EC2018App by Manan-YMCA.
the class ContentActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.navbar_content);
cotainer_root_frame = (RelativeLayout) findViewById(R.id.content_frame);
//
dotsLayout = (LinearLayout) findViewById(R.id.layoutDots);
drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(ContentActivity.this, drawer, null, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.addDrawerListener(toggle);
toggle.syncState();
mProgress = new ProgressDialog(ContentActivity.this);
mProgress.setMessage("I am working");
mProgress.setTitle("yes i am");
mProgress.setCanceledOnTouchOutside(false);
nav_view = (NavigationView) findViewById(R.id.nav_view);
pdfTextView = (TextView) findViewById(R.id.tv_pdf);
nav_view.setNavigationItemSelectedListener((NavigationView.OnNavigationItemSelectedListener) this);
nav_view.setCheckedItem(R.id.nav_home);
userTickets = new ArrayList<QRTicketModel>();
databaseController = new DatabaseController(ContentActivity.this);
mIncomingHandler = new IncomingHandler(ContentActivity.this);
categoriesHeadingTextView = findViewById(R.id.text_viewcategories);
viewPager = (ViewPager) findViewById(R.id.slliderview_pager);
myViewPagerAdapter = new DashboardSlideAdapter(getSupportFragmentManager());
viewPager.setAdapter(myViewPagerAdapter);
viewPager.addOnPageChangeListener(viewPagerPageChangeListener);
ImageView img = findViewById(R.id.drawerTogglebtn);
img.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (!drawer.isDrawerOpen(GravityCompat.START)) {
drawer.openDrawer(GravityCompat.START);
}
}
});
pdfTextView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// missing 'http://' will cause crashed
Uri uri = Uri.parse("http://www.elementsculmyca.com/schedule");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
}
});
addBottomDots(0);
addData();
RecyclerView categoryRecycleview = (RecyclerView) findViewById(R.id.category_recycler_view);
categoryRecycleview.setHasFixedSize(true);
DashboardCategoryScrollerAdapter adapter = new DashboardCategoryScrollerAdapter(ContentActivity.this, allSampleData);
categoryRecycleview.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));
categoryRecycleview.setAdapter(adapter);
}
Aggregations