ListView Item to webView in Main Activity?

I figured out what the problem was; I was missing a string variable in my . Main activity that links up w/the item in the listView activity. See below (First line) Bonus - For whoever has use for it: The onProgressChanged in the webChromeClient shown below has a pre-loader that fires every time a new URL is loaded into it.

Just add the "pd" variable below the setContent(R.layout. MyActivity) and copy & past the mWebView. SetWebClient block in2 your activity as well that has the webView.

Enjoy! SetContentView(R.layout. Main); activityTitle = (TextView) findViewById(R.id.

App_name); activityIcon = (ImageButton) findViewById(R.id. Icon); pd = ProgressDialog. Show(this, "", "Initializing....", true); ..... String url =getIntent().

GetStringExtra("url");// LoadUrl(url); mWebView. SetWebChromeClient(new WebChromeClient() { public void onProgressChanged(WebView view, int progress) { activityTitle. SetText("Loading...."); activity.

SetProgress(progress * 100); pd.show(); if(progress == 100) pd.dismiss(); activityTitle. SetText(" flyDroid ELUA"); activityIcon. SetImageResource(R.drawable.

Ic_menu_icon); } }).

I figured out what the problem was; I was missing a string variable in my . Main activity that links up w/the item in the listView activity. See below (First line).

Bonus - For whoever has use for it: The onProgressChanged in the webChromeClient shown below has a pre-loader that fires every time a new URL is loaded into it. Just add the "pd" variable below the setContent(R.layout. MyActivity) and copy & past the mWebView.

SetWebClient block in2 your activity as well that has the webView. Enjoy! .... setContentView(R.layout.

Main); activityTitle = (TextView) findViewById(R.id. App_name); activityIcon = (ImageButton) findViewById(R.id. Icon); pd = ProgressDialog.

Show(this, "", "Initializing....", true); ..... String url =getIntent(). GetStringExtra("url");// SetJavaScriptEnabled(true); mWebView. LoadUrl(url); mWebView.

SetWebChromeClient(new WebChromeClient() { public void onProgressChanged(WebView view, int progress) { activityTitle. SetText("Loading...."); activity. SetProgress(progress * 100); pd.show(); if(progress == 100) pd.dismiss(); activityTitle.

SetText(" flyDroid ELUA"); activityIcon. SetImageResource(R.drawable. Ic_menu_icon); } }).

Final ListView lv1 = (ListView) findViewById(R.id. Public void onItemClick(AdapterView This, "You have chosen: " + " " + fullObject.getLabel(), Toast.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions