X

By Saurav Kumar
Tue, 01-Oct-2019, 09:11

Last code


} } @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { } @Override public void onPageScrollStateChanged(int state) { } }); } private class MyPagerAdapter extends android.support.v4.view.PagerAdapter { public int getCount() { return 4; } public Object instantiateItem(View collection, int position) { LayoutInflater inflater = (LayoutInflater) collection.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); int resId = 0; switch (position) { case 0: resId = R.layout.one; break; case 1: resId = R.layout.two; break; case 2: resId = R.layout.three; break; case 3: resId = R.layout.four; break; } View view = inflater.inflate(resId, null); ((android.support.v4.view.ViewPager)collection).addView(view, 0); view.setTag("myview" + position); return view; } @Override public void destroyItem(View arg0, int arg1, Object arg2) { ((android.support.v4.view.ViewPager) arg0).removeView((View) arg2); } @Override public boolean isViewFromObject(View arg0, Object arg1) { return arg0 == ((View) arg1); } @Override public Parcelable saveState() { return null; }

This site was designed with Websites.co.in - Website Builder

WhatsApp Google Map
×

Caution! Unverified Website!


The identity of this user has not yet been verified. Please make transactions at your own risk!

Safety and Abuse Reporting

Thanks for being awesome!

We appreciate you contacting us. Our support will get back in touch with you soon!

Have a great day!

Are you sure you want to report abuse against this website?

Please note that your query will be processed only if we find it relevant. Rest all requests will be ignored. If you need help with the website, please login to your dashboard and connect to support