while clicking on the recycler item to show the popup window. Inside the popup window showing tablayout and viewpager. How to show viewpager inside the popup window?. While setup the viewpager adapter it shows java.lang.IllegalArgumentException: No view found for id 0x7f090138
Asked
Active
Viewed 216 times
2
-
1Yes, you can have a `ViewPager` in a `PopupWindow`. However, that error would seem to indicate that you're using `Fragment`s with your `ViewPager`. Are you? If so, then no, not really. You'd have to do it in a `DialogFragment`. – Mike M. Dec 04 '19 at 09:50
-
please attach your code and xml. It's looks like you searching view in the wrong layout – Peter Staranchuk Dec 04 '19 at 09:54
-
1Refer this link https://stackoverflow.com/questions/19544829/viewpager-with-fragments-inside-popupwindow-or-dialogfragment-error-no-view – Ankita Dec 04 '19 at 09:59
-
@MikeM. for DialogFragment can i show case like popupwindow like with in the view position – RamaKrishnan Dec 04 '19 at 10:12
-
1Kinda, but you'd have to handle positioning it yourself. It'd probably easier and more reliable to refactor your `ViewPager` and `PagerAdapter` to use plain `View`s instead of `Fragment`s. – Mike M. Dec 04 '19 at 10:22
-
@MikeM. thanks for the comments and also find the screenshot where i extactly need https://www.dropbox.com/s/wpfaopl9ynp15h6/Screenshot_20191203-210906~2.png?dl=0 – RamaKrishnan Dec 04 '19 at 10:33
-
Yes, it is possible. You do this in this way https://stackoverflow.com/questions/37783900/display-a-viewpager-on-popup-window/37785159#37785159 – Mahabub Karim Dec 04 '19 at 10:37
-
@MahabubKarim thanks for the reply i dont need the dialog. I need the popwindow while clicking the recycler item to show – RamaKrishnan Dec 04 '19 at 10:41
-
1Yeah, that doesn't look like it would require `Fragment`s for anything in particular. Just redo your setup to use a plain `PagerAdapter` with plain `View`s. There are examples of how to do that on [this post](https://stackoverflow.com/q/18710561). – Mike M. Dec 04 '19 at 10:53
-
1@MikeM. thanks man! helpful answer. viewpager without fragments working fine.. – RamaKrishnan Dec 04 '19 at 11:27