Tag: android-viewpager

Eclipse will not recognize project as library (ActionBarSherlock/ViewPagerIndicator)

I’m trying to get ActionBarSherlock and the ViewPagerIndicator libraries set up for my projects, but I seem to be running into a few issues. I sent Jake Wharton (The developer) a few messages earlier about it, and got a few replies but couldn’t get anywhere – and I think he got busy with a few […]

Allow rotation/landscape in one fragment

My app has a single Activity with a FragmentPagerAdapter with four fragments (Using the ViewPagerIndicator library). One of these fragments has designs for both a separate portrait and landscape layout, the other three do not and need to be fixed to portrait orientation. My thought was to set android:configChanges=”orientation” in the manifest and call getActivity().setRequestedScreenOrientation() […]

Android sidebar like facebook or firefox

This question already has an answer here: Android Facebook style slide 25 answers

ViewPager Fragments getting destroyed over time?

I am using Android’s support.v4 package to develop a ViewPager containing multiple Fragments. I am trying to hide the Views when the user changes page. So, I implemented an OnPageChangeListener to listen to my adapter, and call an update() method in my Fragments when when a page change occurs. But I’m getting a NullPointerException, and […]

Android Navigation Bar covering viewpager content

I can’t stop the Systems Navigation Bar from covering up my content! I am scrolled to the very bottom of the recyclerview but its getting hidden behind the navigation bar. Here is my XML layout. <android.support.design.widget.CoordinatorLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” android:id=”@+id/root” android:layout_width=”match_parent” android:layout_height=”match_parent” android:fitsSystemWindows=”true”> <android.support.design.widget.AppBarLayout android:id=”@+id/appbar” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:theme=”@style/ThemeOverlay.AppCompat.Dark.ActionBar”> <include layout=”@layout/toolbar”/> <android.support.design.widget.TabLayout android:id=”@+id/tabs” android:layout_width=”match_parent” android:layout_height=”wrap_content” /> </android.support.design.widget.AppBarLayout> […]

Android ViewPager setCurrentItem not working after onResume

Ive got this strange issue, ViewPager’s setCurrentItem(position, false) works perfectly fine, then im switching to another activity, and after im back to the first activity, the ViewPager always ends up on the first item. Even though ive added setCurrentItem to onResume method it still ignores it. Its not even throwing any exception when im trying […]

Menu Tabs Don't Respond

Currently I’m making UI for my app. I use Sliding Up Panel and Sliding Tabs (tutorial with implementation explanation) features. Both work fine. I even managed to implement them in one project, but that’s where problem comes in – Home and Event’s tabs are unresponsive when I touch them(should open the page it’s representing), but […]

Infinite ViewPager

This seems possible, but I’m having a little trouble figuring out how to implement a ViewPager that can page indefinitely. My use case is for a calendar that shows a month at a time, but would be able to switch to any month by paging enough times. Currently I’m just extending PagerAdapter, and 3 custom […]

How do I tell my custom FragmentPagerAdapter to stop destroying my fragments?

I have a ViewPager with a FragmentPagerAdapter, and my app has previously used just two fragments (different types) without issues. I just added a third fragment, though, and now my adapter/viewpager seems to be destroying my fragments when I get far away from them. For example, if I’m on page 1, page 3 is destroyed […]

View Pager + ImageView +Pinch Zoom + Rotation

I want to implement Pinch Zoom on Imageview, with in View Pager similar to Default Android Gallery. I have found multiple source over GitHub, But the zoom and sliding just work for only first image. What I have tried: 1.) TouchImageView 2.) PhotoView 3.) Android Touch Gallery All the above links works fine for single […]

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