question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ViewPagerIndicator takes up space

See original GitHub issue

I’m using com.itsronald.widget.ViewPagerIndicator like this:

<com.google.android.gms.maps.MapView
      android:id="@+id/activitySpotDetailMapView"
      android:layout_width="0dp"
      android:layout_height="0dp"
      app:layout_constraintDimensionRatio="H,16:9"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintTop_toTopOf="parent"
      />

<android.support.v4.view.ViewPager
    android:id="@+id/activitySpotDetailViewPager"
    android:layout_width="0dp"
    android:layout_height="0dp"
    app:layout_constraintDimensionRatio="H,16:9"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    tools:background="#0f0"
    >
  <com.itsronald.widget.ViewPagerIndicator
      android:layout_width="match_parent"
      android:layout_height="@dimen/detail_page_indicator_height"
      android:layout_gravity="bottom|center_horizontal"
      android:background="@color/view_pager_dot_background"
      android:gravity="center_vertical"
      app:selectedDotColor="@color/view_pager_dot_active"
      app:unselectedDotColor="@color/view_pager_dot_inactive"
      />
</android.support.v4.view.ViewPager>

However the ViewPagerIndicator is not overlaying over the ViewPager items. Instead it takes up the space (as a result the Map will then be rendered). As you can see in the screenshot I’ve got a ViewPager of Images and behind that a Map is shown.

screen shot 2017-05-22 at 15 26 37

I’d like the Indicator to be rendered on top of the images so that the image bounds will be bigger and the map won’t be shown. Is this in any way possible?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
vanniktechcommented, May 24, 2017

Let me know if you need any more information.

0reactions
vanniktechcommented, May 29, 2017

I’ll close this now as this can be achieved now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Space between elements of the indicator - Stack Overflow
I was able to make more space between two indicator by the step: Open the source code of CirclePageIndicator and find the variable...
Read more >
ViewPager with FragmentPagerAdapter - CodePath Cliffnotes
Overview. Layout that allows the user to swipe left and right through "pages" of content which are usually different fragments. This is a...
Read more >
Looping/infinite ViewPager with page indicator in Android
Having put some effort into integrating ViewPagerIndicator, I was going to use it! Fixing the “Can't change tag of fragment” error. The error...
Read more >
How to Implement ViewPager with Dotsindicator in Android?
ViewPager in Android is a class that allows the user to flip left and right through pages of data. This class provides the...
Read more >
Image slider with dot Indicator in android studio - YouTube
In this video we are going to learn how to create image slider using viewpager2 with Indicators in android studioSubscribe the channel ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found