Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8846391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:58:20+00:00 2026-06-14T11:58:20+00:00

I took the viewPager example from here and its working fine with listViews. I

  • 0

I took the viewPager example from here
and its working fine with listViews.

I changed it up a bit to work with webviews.

I removed the listView methods and i changed the class to “extends Fragment” and i added a webview to the fragment layout
this is where i load the url

@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    ((WebView)getActivity().findViewById(R.id.webView1)).loadUrl(imgURL);
}

the methods gets called when i swipe to a new fragment but the image loads on a random fragment. It loads on one fragment and you need to swipe to other fragments until it loads on another fragment randomly but it never appears on two fragments.

I assume its because the ArrayListFragment is static so i tried to make it not static and create new objects in the getItem method but it resulted in the same behavior.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T11:58:21+00:00Added an answer on June 14, 2026 at 11:58 am

    apparently getActivity() was the culprit and i solved the loading with

    WebView wv = (WebView)v.findViewById(R.id.webView1);
    wv.loadUrl(...);
    

    int the onCreateView() method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I took the example code from the Kendo UI demos at http://demos.kendoui.com/web/grid/remote-data.html , binding
I took some code from some questions here in SO as well as some
I took this script from here : import csv from itertools import izip f
I took the minimal PDF example in the PDF specification from PDF Specification ,
I took the suggestion for comparing docx files from here: OutOfMemoryError while doing docx
I took some code from here: - How do I distinguish jQuery selector strings
I took the rendered page from the SWT Browser and exported it to an
I took the standard Item GridView template and modified it a bit to fit
I took a page whose DTD was HTML4 Transitional and changed the doctype to
I took some code here: Check if role consists of particular user in DB?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.