Tag: android-viewpager

ViewPager with indicator without Android's support library

Right now I’m using the ViewPagerIndicator for swipe-able fragments with an indicator in my program and it’s working like a charm. But since Google is pushing more and more into the direction of Fragments without using the Android support library and e.g. PreferenceFragments aren’t available in the support library, I’m wondering if there is something […]

How to access views from view pager

I am using view pager in my activity.I created views for 7 pages. Now i want to access page view inside my activity. I am getting data as blank. In Activity public class ActivitySingleEntry extends Activity implements OnClickListener { private ViewPager mPager; private FixedTabsView mFixedTabs; private ExamplePagerAdapter mPagerAdapter; private TabsAdapter mFixedTabsAdapter; private EditText edtFieldName; @Override […]

Android ViewPager with zoomable ImageView

I’ve got a ViewPager made by ImageViews implemented like this: @Override public Object instantiateItem(View collection, int position) { ImageView iv = new ImageView(ctx); if (pageList.size() > position) iv.setImageBitmap(pageList.get(position)); else iv.setImageResource(R.drawable.loading); iv.setOnTouchListener(this); ((ViewPager) collection).addView(iv, 0); System.out.println(“POS: ” + position); return iv; } Any chance i can have that ImageView zoomable by double tap (and swipe the […]

implementing pinch Zoom using ViewPager

I am using ViewPager to retrieve images from remote server. Everything is working well, but the problem is I don’t know how to implement pinch Zoom in/out function to it. My code is below public class ImagePagerActivity extends BaseActivity { private ViewPager pager; private DisplayImageOptions options; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.ac_image_pager); Bundle bundle […]

Challange: Custom Animation of ViewPager. Change height of chosen elements (View fold)

I am currently working on custom animation between switching pages in ViewPager. When I slide to the left, View is moving to the left and from below of it new View is coming to the front. I would like to make the view, that moves to the left (that I dispose) to shrink like on […]

Separate Back Navigation for a Tabbed View Pager in Android

What I want. In a tab sliding menu context, I want to replace a fragment to another inside a tab, and maintaining the tab menu, and also the current tab. When sliding to another tab and returning to original, I want the last fragment to be displayed. For example, I have tab_a with Fragment_1, tab_b […]

Nested Action Bar Tabs(with ViewPager)

I have a project that uses Action Bar Tabs(with ViewPager). Tabs move really smoothly when swiping between them, but I need to add two sub tabs, in TAB 2, then move to the next tabs or of course back, just like on the Glassdoor or Flipboard. Please help. MainActivity public class MainActivity extends AppCompatActivity { […]

Android – How can I locate the tab indicator between the two tab TextViews?

As far as I know, there are components ViewPager and ActionBar can support “tab navigation” mode but they don’t have intermediate tab indicator between the tabs, just only positioning below a tab TextView. How the Google Play app implemented this feature: POSITIONING linked with transition ?

Why do the TabLayout's tabs' icons/texts blink when swiping between pages?

Background I’ve used the PagerSlidingTabStrip library for a long time, to show tabs above a ViewPager. Recently, I was tasked to set icons (using selectors, with selected-vs-unselected states) instead of texts for the tabs, and so I did. However, it seems that the library couldn’t handle it well, showing empty tabs sometimes, so I’ve moved […]

FragmentPagerAdapter inside Fragment

I’m having a bit of trouble implementing a design based around multiple ViewPagers. At a high level, I have a FragmentActivity with just a FrameLayout as it’s content. I have 3 different Fragments that I want to display. All 3 are full screen and only 1 will be used at a time. Fragment 1 is […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.