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

  • SEARCH
  • Home
  • 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 4029138
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:18:27+00:00 2026-05-20T11:18:27+00:00

I’m now stuck in html loading from my assets folder. I’ve several html pages

  • 0

I’m now stuck in html loading from my assets folder. I’ve several html pages under assets folder and have to load those at listview item onclick. Each listview item own their html pages.Does anybody know how i can get onclick event and how to show specific html pages ?

Thanks

  • 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-05-20T11:18:27+00:00Added an answer on May 20, 2026 at 11:18 am
    public class WebViewWithListActivity extends Activity {                                                    
        private String lv_arr[] = { "Android", "iPhone", "BlackBerry"};                                        
        ListView lv1;                                                                                          
        /** Called when the activity is first created. */                                                      
        @Override                                                                                              
        public void onCreate(Bundle savedInstanceState) {                                                      
            super.onCreate(savedInstanceState);                                                                
            setContentView(R.layout.main);                                                                     
            lv1 = (ListView) findViewById(R.id.listView1);                                                     
            lv1.setAdapter(new ArrayAdapter<String>(this,                                                      
                    android.R.layout.simple_list_item_1, lv_arr));                                             
            lv1.setTextFilterEnabled(true);                                                                    
            lv1.setOnItemClickListener(new OnItemClickListener() {                                             
    
                @Override                                                                                      
                public void onItemClick(AdapterView<?> arg0, View arg1, int position,long id)                  
                {                                                                                              
                        AlertDialog.Builder adb = new AlertDialog.Builder(WebViewWithListActivity.this);       
                        adb.setTitle("Selected item");                                                         
                        adb.setMessage("Selected Item is = "                                                   
                                + lv1.getItemAtPosition(position));                                            
                        adb.setPositiveButton("Ok", null);                                                     
                        Log.i("Selected item is ",(String) lv1.getItemAtPosition(position)+"" );               
                         adb.show();                                                                           
    
                        //TextView tvUrl = (TextView) view.findViewById(R.id.item2);                           
                        TextView tvUrl=(TextView) findViewById(R.id.item2);                                    
                        if(lv1.getItemAtPosition(position).equals("Android"))                                  
                        {                                                                                      
                                    GlobalVariable.SetURL("http://www.google.co.in/");                         
                                    Log.i("Global vari : ",GlobalVariable.GetURL());                           
                                    Intent i = new Intent(WebViewWithListActivity.this,WebViewDemo.class);     
                                    //i.putExtra("http://www.google.co.in/", tvUrl.getText());                 
    
                                    startActivity(i);                                                          
    
                        }                                                                                      
    
                }                                                                                              
            });                                                                                                
    
    
        }                                                                                                      
    }                                                                                                
    

    This is WebViewDemo. I simply extended Activity:

    public class WebViewDemo extends Activity{
        private WebView webView;
    
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.layout_webview);
            //String url =getIntent().getStringExtra("url");//get url that pass from the other screen
            //Log.i("url ", url+"");
            Log.i("Global vari : ",GlobalVariable.GetURL());
    
            webView = (WebView)findViewById(R.id.wvDisplay);
            WebSettings webSetting= webView.getSettings(); //create new settings for webView
            webSetting.setJavaScriptEnabled(true); // enabled javascript
            webView.setWebViewClient(new WebViewClient()); //set up webviewclient, this set not to open the default browser when link click
            //Log.i("url ", url+"");
            webView.loadUrl(GlobalVariable.GetURL());//load the web page
    
    
    
        }
    
    }
    
    
    public class GlobalVariable extends Application{
        private static String url;
        public static String GetURL() 
        {
            return url;
        }
         public static void SetURL(String URL) {
                url = URL;
            }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is what i have right now Drawing an RSS feed into the php,
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a bunch of posts stored in text files formatted in yaml/textile (from
I have just tried to save a simple *.rtf file with some websites and
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Does anyone know how can I replace this 2 symbol below from the string
I have some data like this: 1 2 3 4 5 9 2 6
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

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.