Tag: android-viewpager

How to add margin between EditText and Soft Keyboard?

I want to add 10dp margin between EditText and Soft Keyboard. Here is my XML: <RelativeLayout android:id=”@+id/BottomLayout” android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:layout_alignParentBottom=”true” android:layout_alignParentLeft=”true” android:background=”@drawable/bottom_glass” > <EditText android:id=”@+id/message” android:layout_width=”200dp” android:layout_height=”wrap_content” android:layout_centerHorizontal=”true” android:layout_centerVertical=”true” android:background=”@drawable/grey” android:ems=”10″ android:layout_marginBottom=”10dp” android:hint=”Enter Message” android:textColor=”#ffffff” > </EditText> <ImageButton android:id=”@+id/sendMessageButton” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_centerVertical=”true” android:layout_marginLeft=”20dp” android:layout_toRightOf=”@+id/message” android:background=”@android:color/transparent” android:src=”@drawable/sendselector” /> <ImageButton android:id=”@+id/imageButton2″ android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_centerVertical=”true” android:layout_marginRight=”20dp” android:layout_toLeftOf=”@+id/message” android:background=”@android:color/transparent” […]

Source code for new Android Lollipop Calendar app

Does anyone know where I can find the source code for the updated Android Calendar app that is present in 5.0? I did look at this where the source for the old Calendar app is present but I did not find where the viewpager for the months is present. In fact I did not even […]

ViewPager fragments recreation, are resumed but not visible

I have an issue with a ViewPager + FragmentPageAdapter. Scenario: I have one Activity with inside a Fragment A. Fragment A has a ViewPager with Fragment B1 e Fragment B2. B1 e B2 are the same class, but different data as argument. Problem: Everything works well at creation time. But when the app goes in […]

Viewpager+FragmentpagerAdapet+Fragments+Listview = insanely slow app

I have a viewpager in my layout , that viewpager holds a set of 10 fragments . Each fragment has a list view , which is asynchronously populated . I m currently using FragmentPagerAdapter as adapter for the viewpager and the API calls to populate the list view is done in onCreateView of each fragment […]

ViewPager works Fine at first time but on reloading again, getting the error java.lang.IllegalStateException?

I have a ViewPager with the 10 images comes through webservices(JSON), At first ViewPager work smoothly (fine). but When back from the activity and reopen it again I got this error : java.lang.IllegalStateException: The application’s PagerAdapter changed the adapter’s contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 10, found: 0 Pager id: com.akm.demo.activities:id/slideShowPager Pager class: […]

FragmentPagerAdapter – how to detect a swipe or a tab click when user goes to a new tab?

I have a MainActivity that has three fragments in a FragmentPagerAdapter as below. How can I find out when an user goes from 1st fragment to second or from second to third, either with swiping or with a click on the tab? I saw that the getItem() method is not called always as I have […]

View Pager with Universal Image Loader Out of Memory Error

I am not really sure if a ViewPager with Universal Image Loader can/should be used as an alternate for a gallery like interface since I have run into an Out of Memory error while loading images from SD Card and viewing them in full screen mode. No matter what the number, it works all fine […]

Android ViewPager with ScrollViews with ViewPagers inside the ScrollViews

So I have my activity which has a main ViewPager and inside of the ViewPager each page has the whole content as a ScrollView and inside of that ScrollView there is another ViewPager. This might sound crazy but basically the outer ViewPager contains news articles, and the articles are long so there is a ScrollView, […]

how load fragment in ViewPager only when its selected

im using 3 Fragments inside a Viewpager, the problem its im loading big data in asytask and loaders, in devices like HTC one works well, however in low end devices take a lot of time. THis is because mainly when i implement the pagerAdapter i put the Fragments inside an arrayList, this force the fragments […]

(ActionBar) Tabs + Pager + detail Fragments inside ViewPager container

For ActionBarSherlock I would like to have (Action Bar) Tabs + Pager. I use Fragments inside that pager container. I already got the examples of http://actionbarsherlock.com/ working, but I can’t manage to get a details fragment inside that pager container when I would click on let’s say a listitem in the first fragment. Is it […]

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