Questions tagged [android-viewpager]

ViewPager.setcurrentItem( ) freezes ui

Filter by
Sorted by
Tagged with
0 votes
0 answers
10 views

how to make wrap_content property works in viewPager(which in a dialogFragment)

i create a dialogFragment to show a dialog for user, and i try to use a viewPager in this dialog. Without this viewPager, i can make this dialog's height wrap the content. but after using viewpager, ...
tomastu's user avatar
0 votes
0 answers
17 views

when the LazyRow inside a ViewPager is scrolled to its end, it scrolls the ViewPager to the next page

I have a ViewPager that contains two pages and inside each page there is a LazyColumn that shows a list of tasks. And inside that LazyColumn above those tasks I have a LazyRow item that shows the ...
23_59's user avatar
  • 13
0 votes
1 answer
32 views

How can I align vertical center contents in Android Compose VerticalPager

I am developing an android app using the Jetpack compose. I should develop a Screen. It has many Contents Card (Like Feed) But it should be scrolled sticky. So I used the VerticalPager. When user ...
yoonhok's user avatar
  • 2,597
0 votes
0 answers
38 views

Android Infinite Auto Image Slider Using View Pager 2 issue

In my app there's a viewPager containing the images of products, and I've created the logic to auto-slide images every 3 seconds shows an image and if the user touches the screen it should stop ...
Dr Mido's user avatar
  • 2,438
0 votes
0 answers
14 views

ViewPager with 2 pages and exoplayer views in both of them

I have a main viewpager with two view pagers as page one and page two, try to think something like a tiktok feed on both pages but with images and videos. Everything is fine and all, but when the ...
Panos Post's user avatar
0 votes
0 answers
23 views

Android Viewpager items gone invisible while the Fragment is started. But reappearing after locking and unlocking device

[N.B. This problem is from an old app; developed couple of years ago. Back then the app was working fine] Case 1: I was trying to show some SQLite data inside a fragment. (Extending Listfragment and ...
Rcktnm's user avatar
  • 1
0 votes
1 answer
42 views

HorizontalPager not recomposing everytime

i am using a HorizontalPager and im passing values to it, and one of the tabs receiving a boolean is not very consistent, sometimes the value passes and some othertimes it is not passing to the tab ...
joghm's user avatar
  • 569
1 vote
0 answers
24 views

NullPointerException on View Pager getCurrentItem

I am using viewpager for a carousel in my application. it works fine when the app open for the first time, but when coming back from another fragment am getting an error as NullPointerException, I ...
Anees Ani's user avatar
0 votes
1 answer
38 views

How to use webview in viewpager?

I have a horizontal pager in which i use a webview to load urls. I use this on a quiz game i am trying to make. The code for Webview is this. jsInterface = ...
mikelantzelo's user avatar
2 votes
1 answer
226 views

Jetpack Compose HorizontalPager exception

I got crash when I used pager in my app I used a HorizontalPager from androidx.compose.foundation.pager in my app. My function's @Preview work properly even in interaction mode, but when I run the app ...
Mohammad Rezaei's user avatar
1 vote
1 answer
26 views

Talkback does not announce Page information when ViewPager is launched

I have a simple ViewPager. A very basic one. When we enable accessibility, when user lands on the ViewPager, the talkback announces the Fragment contents inside the ViewPager, ending with "inside ...
Sarfaraz's user avatar
  • 324
0 votes
0 answers
82 views

Compose synchronize two HorizontalPager Offset Fraction

Hallo everyone i have created a Compose function with two HorizontalPager but i wanted to synchronize the scrolling between both of them when the user scrolling left or right and i try the following ...
j osh's user avatar
  • 36
0 votes
1 answer
44 views

Print pdf in multiple pages if one page not enough

I'm trying to create a PDF from layout; I converted the layout to bitmap and then printed into the pdf page. The application converts the output into a long PDF page, but I want to divide the bitmap ...
HGSu's user avatar
  • 25
0 votes
0 answers
6 views

How to update a text view in the one position of the viewpager

I am using a viewpager to load the pages with multiple text views. Based on some conditions I have update the text view in the current position of the view pager. How do I do this without having to ...
Nikitha's user avatar
  • 49
0 votes
0 answers
35 views

What's the best way to use TabRow Tabs with viewModel in Compose?

Currently I'm developing a "pager" , my idea is to fill from the database the "tabs", and each tab will have an id, this Id will help me to query a list from room with a list of ...
Javier's user avatar
  • 1,469
0 votes
0 answers
18 views

resetCancelNextUpFlag NullPointerException in viewpager touchlistener android

Touchlistener added to viewpager sometimes causes Attempt to read from field 'int android.view.View.mPrivateFlags' on a null object reference in method 'boolean android.view.ViewGroup....
Nurseyit Tursunkulov's user avatar
0 votes
0 answers
16 views

How can I add text below my carousel image? I used View Pager for the carousel

This is what I have now <androidx.viewpager.widget.ViewPager android:id="@+id/carouselContainer" android:layout_width="match_parent" android:layout_height="200dp" ...
David Gabriel's user avatar
0 votes
1 answer
36 views

how to change viewpager in activity intent android?

I want the ViewPagerAdapter in these to go to the activity and don't know how to get it.This format adapter.addFrag(new RssFragment(), "news"); how to change convert adapter.addFrag(new ...
jay raman's user avatar
0 votes
2 answers
39 views

Can we use ViewPage in wrap content

If I use viewpager in wrap content I always end up with the error Process: com.example.openinapp, PID: 5144 java.lang.IllegalStateException: Pages must fill the whole ViewPager2 (use match_parent)
Neel Doshi's user avatar
0 votes
0 answers
27 views

Trying to apply StickyScroll with Viewpager

In my profile page I have StickyScrollview and viewpager in which I have two fragments each of which attach with recyclerview. Im trying to implement StickySroll and want to achive same like one ...
Remo's user avatar
  • 1
3 votes
0 answers
87 views

Compose VerticalPager with scrollable item in it causes laggy nested scroll

I can't accomplish smooth scroll behavior with pager and scrollable item inside it. Is there any way to make transition smooth, or disable it at all ? I'm using 'androidx.compose.foundation:foundation:...
Daniil Pozdnyakov's user avatar
0 votes
2 answers
15 views

Cannot inflate my viewNotesFragment.in viewpager

My code ViewPagerAdapter: package io.lionpswn.kodular.notepad import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentManager import androidx.fragment.app.FragmentPagerAdapter ...
jiji solaman's user avatar
1 vote
1 answer
118 views

Stop Another Video when Playing Current Video Viewpager 2 and Exoplayer

I'm workig on Swipable Video Player using ViewPager 2 and Exoplayer 2. In my code everything is working fine and Video is playing when showing to current visible view of ViewPager. Big problem is when ...
M DEV's user avatar
  • 773
0 votes
0 answers
16 views

How to stop overlapping in ViewPager when change the tab

I have two fragments one is simple video and another is event video,When i call onTabSelected multiple time in very short time period, means change tab quickly then my previous tab video's sound is ...
Amit Sharma's user avatar
0 votes
0 answers
111 views

React-native Android error: Invariant Violation: requireNativeComponent: "RNCViewPager" was not found in the UIManager

I just want to build top tab navigation and I followed the official documentation, I did everything to fix this error, even manually linked but It didn't work (however new versions of react-native ...
Alan wick's user avatar
0 votes
0 answers
39 views

How to stop previous item in viewpager holder with exoplayer with user scroll

Exoplayer Inside Viewpager playing video after user scroll the pager this cause exoplayer to keep play the scrolled video and the current video which make the app buggy. For past two days i searched ...
charle's user avatar
  • 70
1 vote
0 answers
21 views

FragmentPagerAdapter keeps not visible fragment menu

I'm using menu provider to create option menu specific by fragment, fragments are managed by viewpager + FragmentPagerAdapter (requireActivity() as MenuHost).addMenuProvider( object : ...
Nininea's user avatar
  • 2,671
-1 votes
1 answer
29 views

Custom Android View Pager Animation

I am trying to achieve this animation using the page Transformer. Any help is highly appreciated.
Prashant Kumar's user avatar
0 votes
0 answers
40 views

Android: ViewPager2 is resetting my activity view

I have implemented ViewPager2 in an activity. It has 3 fragments only. I am running some Service (binded) for some background work that then updates the UI in Activity and one of the fragments. The ...
M. Usman Khan's user avatar
0 votes
0 answers
18 views

How to make a tab unfocusable[Not selectable] in TabLayout - ViewPager

I have implemented scrollable view with TabLayout, ViewPager and Fragments. What I am trying to achieve- I don't want one of the tab to receive focus[Not through scrolling or click on tab in TabLayout]...
Makarand's user avatar
  • 983
-1 votes
1 answer
36 views

ViewPager not displaying all fragments - only visible when tapped

Fragment visibility problem inside in ViewPager I have a ViewPager, inside this multiple fragment associated and all fragment creating by for loop according to fragment list size. All fragment is ...
Kapil Soni's user avatar
1 vote
1 answer
437 views

How to handle horizontal scroll gesture combined with transform gestures in Jetpack Compose

Hi I want to have a zoomable image in a horizontal pager. I already implemented transform gestures and double tap but now, I can't scroll my pager with scrolling over the image. I guess panning and ...
Sevban Bayır's user avatar
0 votes
0 answers
110 views

Does anyone have details on saveEnabled for ViewPager2?

So we have a ViewPager in our App that loads hundreds of fragments and we are getting a crash with TransactionTooLargeException. So here is our setup: Activity: We have the an activity that has the ...
huey77's user avatar
  • 653
0 votes
0 answers
19 views

Issue with RecyclerView not updating when returning to the first page after navigating to the second page of ViewPager2

My code is a program that displays ViewPager2 in the MainActivity and shows different lists on the second page using RecyclerView. When I press the Edit mode, the checkboxes and move buttons of each ...
jong heok Kim's user avatar
0 votes
1 answer
37 views

How to stop refreshing fragment on tab change with FragmentStateAdapter and ViewPager2?

I'm using FragementStateAdapter and ViewPager2 in my Android project. But the problem is that my fragment is being reloaded on tab change. I want to stop that how do I do that? I have tried many ...
CODAR747's user avatar
  • 230
0 votes
1 answer
32 views

Activity loading after 5-6 seconds in Android

I am working on an app and here it takes 5-6 sec to load the activity when I open the app, I know it is because of the dates I have got of 10 years in the viewpager but how do I fix that and load it ...
Deepak Bhatt's user avatar
0 votes
1 answer
44 views

ViewPager in AlertDialog showing both fragments instead of one at a time

I'm trying to display a ViewPager with multiple fragments inside an AlertDialog. The ViewPager is set up with a custom FragmentStateAdapter, and I have defined two fragments: ChatGanerelFragment and ...
David Feldman's user avatar
0 votes
0 answers
56 views

Integration of detectTransformGestures (zoom...) with brand new ViewPager from latest Jetpack Compose libraries (v1.4.3)

With latest Jetpack compose library, view pager integration is quite straight forward. But when I add a modifier with the detectTransformGestures method, as defined in the official android ...
Bruno Sinou's user avatar
0 votes
0 answers
38 views

ViewPager2 as gridview calendar application

I am building a Calendar app and I want it to be like Google Calendar. As I was informed Google Calendar uses ViewPager2. The problem is that I made my adapter and everything I need to populate my ...
Chris Damianidis's user avatar
0 votes
0 answers
14 views

How to fix Smartiest Photo slider indicator not updating after removing slide with ViewAdapter and MVVM architecture in Android?

I am using Smartiest Photo slider library . I have a remove button on each slide , whenever it is clicked that slide is removed. But in my case Slide is removed but the indicator at the bottom remains ...
Vikalp Ranjan's user avatar
0 votes
0 answers
34 views

Selected tab scrolled to center

i want tabs like in image, when tab selected it scrolled to center, You may check you own device camera screen
Zeeshan Ahmad's user avatar
0 votes
0 answers
19 views

How stop recycler view scroll when reach last item in the bottom of screen that view pager inside coordinate layout with appbar layout?

I tried to setup view pager inside coordinate layout with appbar layout. And also recycler view inside the viewpager. it is scrolling. Appbar layout has top view in disply. I need to stop scrolling to ...
Isuru Gunasekara's user avatar
0 votes
0 answers
20 views

Am trying to pause a video on viewpager swipe

I've searched and this is the possible answer I got and I don't know how to go about it, I don't just understand @Override public void onPageSelected(int position) { // find your player ...
devfreeguy's user avatar
1 vote
0 answers
30 views

Is it possible to show data from two different room database tables into single viewpager

I have two fragments in my app one is QuotesFragment and Another is FavouritesFragments both of which get their data from room database from two differnt tables and display it into a recycleview and ...
John doe's user avatar
  • 106
0 votes
0 answers
18 views

Scroll Issue : Horizontal recyclerview inside vertical view page adaptor (cant scroll vertical view pager when scroll recyclerview)

I have a vertical view pager for short news app with poll , ad and insight(horizontal recyclerview), ex inshort news app. when news , poll and ad comes it looks good and scroll works fine but when ...
pawan kumar's user avatar
0 votes
0 answers
49 views

How to drag & drop in ViewPager2?

I need to add drag & drop the item event in ViewPager2. But, I can't find the example of viewPager2 with ItemThouchCallBack.OnItemMoveListener. I know that RecyclerView can support this event. but ...
minji King's user avatar
0 votes
0 answers
20 views

SortableTableView Header Cannot Be Clicked inside of ViewPager2's Fragment

I'm currently making a java project for android and I have a ViewPager2 class, Inside one of it's fragments. I use the SortableTableView Library to make a sortable table. The dataclicked function ...
Danny's user avatar
  • 1
0 votes
0 answers
42 views

Android ViewPager: Issue with random calls of onPageSelected in a loop

I have app which has TabLayout implemented with ViewPager. I'm not using Fragments but custom Pages in ViewPagerAdapter. Issue what I experience is right as app starts, if user is tapping on all tabs ...
martin1337's user avatar
  • 2,414
0 votes
0 answers
18 views

How to make shared element animation from recyclerView of Fragment to viewPage of Activity with Kotin?

I tried to make shared element animation from recyclerView of Fragment to viewPager of Activity. I only can find shared element animation between fragments or activities, each. I find that if I want ...
Hyejung's user avatar
  • 938
1 vote
0 answers
64 views

RecyclerView in ViewPager not Updating, working fine in Code, but not in Device

I had a severe problem and have not been able to solve it for the last three days, I'm explaining an issue here so you call help me out (and yes, before asking question here, I have already done R&...
Vivek Thummar's user avatar

1
2 3 4 5
217