I'm using ViewPager + FragmentStatePagerAdapter. The adapter hosts a list of a simple fragment containing a WebView.
For example, the user is in page 3, he zooms the WebView to 150%.
This is the listener i have on my viewPager:
viewPager.setOnPageChangeListener(new OnPageChangeListener() {
@Override
public void onPageSelected(int arg0) {
pageNr.setText("page: " + (viewPager.getCurrentItem() + 1) + "/" + viewPager.getChildCount());
currentSlide = viewPager.getCurrentItem();
page = viewPager.getCurrentItem();
view
I have a ViewPager, with each view being a WebView. I'd like, if the user clicks on a link in one of the WebViews, to set the title of the Actionbar to the current web page.
I was hoping I could use shouldOverrideUrlLoading to do that, but the page title is always the previous page. So if a user clicks on link 1, then link 2, and link 3.
I have this problem,
in my app there is a viewpager with 3 page, in the middle page (position 1) I have set getPageWidth 0.80f then the page 1 is composed by fragment1 + 0.20 of fragment2
when I scroll to right , from page 0 to page 1 , in this page, the fragment2 refresh after fragment1.
I adopted notifyDataSetChanged(), requestLayout() and I saw this answer :
ViewPager + PagerAdapter shows bl
I have a ViewPager that contains two fragments. In any of the fragments I can touch a place, swipe to switch to another fragment. One of the fragments contains a list. Items in the list contains one TextView and one ImageView. The issue is, if you dragging has been started from tapping the ImageView, it's OK.
I'm trying to build a ViewPager which contains a bunch of WebViews. I'm able to get the ViewPager working, however, only the initial WebView is loading it's content. When I swipe to the other views, they are coming up blank. No error message or anything.
I have a fragment that extends SlidingDrawer. And in it I have a custom view that functions like a vertically scrolling ViewPager. Now, the app that I'm working on has a map. The ViewPager is supposed to be filled with the locations that are near where my map is centered.
I have a layout that is over top of a viewpager.
The viewpager is functioning as a dynamically changing background.
Upon a long click of the viewpager (long clicking the background), the foreground elements should disappear.
I put a long click listener on the viewpager, but it doesn't respond to this out of the box.
So I have a ListView inside of a ViewPager.
I have the ListView in one layout (add_site.xml) and an EditText field that would populate the ListView onClick on another layout (main.xml)
I'm getting an NPE error because I tried to put the ArrayAdapter globlaly thinking that was the right approach to be able talk to both of those layouts in the ViewPager.
Clearly my android dev skills aren't that