ADB Genymotion Upgrade Issue: Devices Not Showing Up (“adb server is out of date. killing…”)

I upgraded a lot of things on my system. From Mavericks to Yosemite (upgrading the entire Mac operating system itself) to upgrading the Android SDK with Eclipse as well as Android Studio from 0.6.1 to 0.8.6.

Continue reading “ADB Genymotion Upgrade Issue: Devices Not Showing Up (“adb server is out of date. killing…”)”

Android Image Slideshow using ViewPager with PagerAdapter

We’ve already discussed ViewPager in depth in one of my earlier posts. We saw how to use it with specific PagerAdapter implementations like FragmentPagerAdapter and FragmentStatePagerAdapter that works with fragments but we can also use it to inflate any other View or ViewGroup (with standard View hierarchy) by hooking it up with PagerAdapter itself. In this tutorial we’ll just discuss how to how to hook a PagerAdapter to a ViewPager to create an Image slideshow.

Continue reading “Android Image Slideshow using ViewPager with PagerAdapter”

Android PagerTabStrip and PagerTitleStrip with ViewPager

Note: This post is sort of a continuation of my previous post on ViewPager and its related pager adapters with tabs.

When working with ViewPager we most likely include action bar tabs and integrate them with their corresponding screens in the ViewPager. Action bar tabs works great but just incase if you prefer scrollable tabs and want to use them over action bar tabs then there are two ways to achieve that:

Continue reading “Android PagerTabStrip and PagerTitleStrip with ViewPager”

Android Swipe (Touch Gesture) Views Using ViewPager, FragmentPagerAdapter and FragmentStatePagerAdapter With Action Bar Tabs

Swipe Views are an efficient way to allow the user to laterally navigate among related data items spread across multiple panes using a simple touch gesture (swipes/flings), making access to data faster and much more enjoyable. Think of the android home screen where you can swipe across multiple sibling screens or the facebook or twitter app with multiple screens (and their respective tabs) where you can just swipe to navigate through them. The entire experience is super interactive and fun. They’re basically equivalent to slideshows/carousels which has sections with/without tabs (or similar controls to navigate) in the web development arena.

Continue reading “Android Swipe (Touch Gesture) Views Using ViewPager, FragmentPagerAdapter and FragmentStatePagerAdapter With Action Bar Tabs”

Android ViewFlipper and ViewSwitcher with GestureDetector Swipes/Flings

While developing an Android application, most of us will encounter the need to integrate a section in our app where the user can switch between Views. So it should show one view which can be an ImageView or a collection inside LinearLayout, RelativeLayout, etc. at a time that can be swiped/flinged to move to the next or previous item. Think of a slideshow of images or a step-based process like e-commerce checkouts. Basically whenever you want to swipe through a set of related sections but show only one at a time then you can leverage ViewFlipper or ViewSwitcher class widgets that Android provides us. The detection of gestures can be achieved with major use of the MotionEvent class but we’ll make use of GestureDetector for this article.

Continue reading “Android ViewFlipper and ViewSwitcher with GestureDetector Swipes/Flings”

Quick Tip: Android ViewFlipper Jump/Move/Switch To a Certain Child View

At times you might want to jump the user to a specific View inside a ViewFlipper on the click of some other View or some such scenario. So let’s say we have a ViewFlipper in our layout resource like this:

Continue reading “Quick Tip: Android ViewFlipper Jump/Move/Switch To a Certain Child View”