android-viewpager

Viewpager with circle and title indicator

浪尽此生 提交于 2020-01-06 08:26:20
问题 I'm using Viewpager and the Circle and Title view pager from JakeWharton The viewpager with the circle indicator is working fine, but while using the view pager with both circle and title indicator both indicators are not working. Here is a screenshow of the issue: So is it possible to use both indicators at the same time, and if so how can I do that? Also does anyone knows how can I style the title indicator? Right now it shows a blue line and no text.. Here is my code: adapter = new

ViewPager on Android 4.3 missing content

末鹿安然 提交于 2020-01-06 07:16:27
问题 I have a ListView each item of which is ViewPager with some content (mostly images). Everything works fine bot not on Android 4.3 and above ViewPager 's content is missing and ViewPager not scrollable. I don't know which part of source code to provide here - ask me and I'll try to provide you maximum info. EDIT: Found out that ViewPager in my case has zero dimensions. But only on Android 4.3+. Here is part of my layout: <...AdaptableHeightImageView android:id="@android:id/icon" android:layout

ViewPager.setCurrentItem responsing NullPointerException

假装没事ソ 提交于 2020-01-06 04:39:04
问题 I have implemented ViewPager and fragment(say A, B, C, D, E) as an child. mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager()); mViewPager.setAdapter(mSectionsPagerAdapter); // FragmentStatePagerAdapter after then I called mViewPager.setCurrentItem(3, false); which is giving NullPointerException. Following log: java.lang.NullPointerException E/AndroidRuntime( 330): at android.support.v4.app.FragmentStatePagerAdapter.instantiateItem(FragmentStatePagerAdapter.java:116)

Android layout advice (RecyclerView, ViewPager and CardView)

て烟熏妆下的殇ゞ 提交于 2020-01-06 02:37:06
问题 I need some advice to implement a design for my android application. I'm using a RecyclerView to display a list of CardView . No problem with that. But, I need a top section with a ViewPager that display other CardView with horizontal swipping: See http://i.stack.imgur.com/akg2i.png I've read that Viewpager is not very built to be in a RecyclerView , so maybe a better way is to create a ScrollView with a ViewPager inside then a RecyclerView below and disable the scrolling of the RecyclerView

Image not loading in first page of ViewPager (PagerAdapter)

我怕爱的太早我们不能终老 提交于 2020-01-06 02:28:08
问题 I am new to android development and I am attempting to create a ViewPager with a custom PagerAdapter . In my page adapter layout, I have an CircleImageView and I'm using Ion with a overridden Future callback to download and set the image. However, when the activity loads, the first page has an empty ImageView (the TextViews contain the correct information). When I scroll to the second page, I see the first page's image. This is a continuous cycle until the view is destroyed and I scroll back

Adjust view size inside viewpager, make up for tab height

我们两清 提交于 2020-01-06 00:01:11
问题 I'm having a bit of a problem with a ViewPager that loads fragments for each of its three tabs. Inside the first fragment, there's a vertical LinearLayout with a ListView. The list view is dynamically loaded with items, but when the item count exceeds the screen size, it doesn't scroll to show the rest of the items. My guess is that the fragment (which is setup to match the parent's height) is pushed down by the tabview in the parent layout (a CoordinatorLayout inside a DrawerLayout). How can

Adjust view size inside viewpager, make up for tab height

我们两清 提交于 2020-01-06 00:00:19
问题 I'm having a bit of a problem with a ViewPager that loads fragments for each of its three tabs. Inside the first fragment, there's a vertical LinearLayout with a ListView. The list view is dynamically loaded with items, but when the item count exceeds the screen size, it doesn't scroll to show the rest of the items. My guess is that the fragment (which is setup to match the parent's height) is pushed down by the tabview in the parent layout (a CoordinatorLayout inside a DrawerLayout). How can

ViewPager Activity change content when slide

我只是一个虾纸丫 提交于 2020-01-05 10:09:22
问题 I've been looking around but I can't figure out how I can fixed this issue. I'm using the @Dave Morrissey's Subsampling Zoom Image View, is a great library and it works perfect, but I want to do a few changes. For each image that the user will slide I want show the specific description. So it will be: Pic1 |Pic2 |Pic3 DescriptionPic1 |DescriptionPic2 |DescriptionPic3 When I open it I can see the picture with below the right description but when I slide left(or right) I can see always the

Fixed button that stays even when viewPager is swiped

有些话、适合烂在心里 提交于 2020-01-05 09:47:29
问题 I have have a close button [x] in two of my xml (with floating dialog theme), which i am using viewPager with. The close button is located at the top right hand corner of the two xml. However, as i swipe left or right, the button gets swipe to and fro too which looks really weird. Any idea to make the button stay fixed even when i swipe the pages? Code from one of the page (both pages are similar): <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com

Fixed button that stays even when viewPager is swiped

北战南征 提交于 2020-01-05 09:46:23
问题 I have have a close button [x] in two of my xml (with floating dialog theme), which i am using viewPager with. The close button is located at the top right hand corner of the two xml. However, as i swipe left or right, the button gets swipe to and fro too which looks really weird. Any idea to make the button stay fixed even when i swipe the pages? Code from one of the page (both pages are similar): <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com