Tag: android-viewpager

ViewPager not showing anything

I am create view pager with custom view pager adapter but when i run the project i can not see anything public class CustomAdapter extends PagerAdapter { private List<NewsObject> newsObjects; private Activity mActivity; private LayoutInflater inflater; private ImageLoaderConfiguration imageConfig; private ImageLoader imageLoader = ImageLoader.getInstance(); public CustomAdapter(List<NewsObject> newsObjects, Activity mActivity) { super(); Log.d(“Con :”, “structor”); this.newsObjects […]

Android: How to implement viewpager and views in single xml file

UPDATED : Can I use the following layout to implement 3 textviews in Viewpager : <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:orientation=”vertical”> <android.support.v4.view.ViewPager android:id=”@+id/pager” android:layout_width=”match_parent” android:layout_height=”match_parent”> <TextView android:layout_height=”wrap_content” android:layout_width=”wrap_content” android:text=”view 1″/> <TextView android:layout_height=”wrap_content” android:layout_width=”wrap_content” android:text=”view 2″/> <TextView android:layout_height=”wrap_content” android:layout_width=”wrap_content” android:text=”view 3″/> </android.support.v4.view.ViewPager> </LinearLayout> I want to implement the ViewPager for these 3 views. and i want to […]

Is it possible to do this Android screen animation with a ViewPager?

I need to make 2 screens with custom animation like explained below : Screen 1 Screen 2 —————————– —————————— | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | […]

Setting RadioButton.setChecked with Multiple Fragments

Hey I have a really stupid problem and I can’t figure out why it is not working as expected. So I have a MultiFragment layout (each one has some different questions) using viewpager and FragmentStatePagerAdapter. When I open the screen that hosts all these fragments I am trying to restore the previous state (marking all […]

Disable the gestures in PagerAdapter/ViewPager

first of all sorry for my bad english. I got a working PagerAdapter with 3 Views. It works fine. I can switch through the Views with normal gestures AND with Buttonclicks. But i want to disable the gestures. Is it possible to switch through the Views only with buttonClicks and disable the gestures? here is […]

Disable ListView Scrolling when swiping ViewPager

is there a way to lock the vertical scrolling of a ListView while scrolling an item which is a ViewPager? Or perhaps change the horizontal scrolling sensitivity of the ViewPager? Thanks. LAST EDIT Here is my updated solution. Thanks for your replies Masoud Dadashi, your comments finally made me came up with a solution to […]

ActionBar BUG: List mode navigation not visible after using SearchView

Project demonstrating this bug: https://github.com/smarek/ActionBar-Navigation-Bug Bugreport on b.android.com : http://code.google.com/p/android/issues/detail?id=51449 I’m currently facing an issue with ActionBar. Let’s have a ViewPager+PagerTitleStrip and 3 Fragments. User flow: Open application First Fragment has set navigation mode to NAVIGATION_MODE_LIST Other Fragments has NAVIGATION_MODE_STANDARD All Fragments has options menu item with SearchView Go to second or third and open […]

Save/Restore fragments state android

I am trying to create an app that uses Jack Wharton’s ViewPager library (here) using only images for every page (something like Prixing (here) main screen). Everything works ok, except for the saveInstance in the Fragment. In Jack Wharton’s example, he stores the text in a String variable, named mContent, and restores it in onCreate, […]

PagerTabStrip tabs alignment to left

I am using PagerTabStrip to set sliding tabs. However, when I set three tabs, it shows the first tab in the center so users cannot see all three tabs at first glance. How can I align them to left? I want to move tabs to the left like this. I tried gravity, but no luck. […]

Nested Fragments using support library v4 revision 11

The last revision of the support library from this morning (Android Support Package v4 revision 11) is supposed to support nested fragments. In my project I have a fragment that contains a ViewPager and this ViewPager contains several fragments. I’m calling getSupportFragmentManager() instead of getFragmentManager to use the FragmentManager of the support library. The problem […]

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