I see how to pop up a webview all day while a single row click on my list activity. When clicked I can not even show a toast Help.
I'm still new to Android, a web developer who is trying to learn. First Thanks
Package com.mf.ar;
Import org.json.JSONArray; Import org.json.JSONException; Import org.json.JSONObject;
Import android.app.activity; Import android.app.AlertDialog; Import android.app.ListActivity; Importroid.os.Bundle; Import android.util.log; Import android.view.View; Import android.view.Window; Import android.webkit.WebChromeClient; Import android.webkit.WebView; Import android.webkit.WebViewClient; Import android.widget.ArrayAdapter; Import android.widget.Toast;
Extension of the public category ListViewer list {Private string mJSON; Private string [] listRows; Private string [] listRowsURI;
/ ** is when activity first created * / @Override Public Zero OnCreate (bundled savedInstanceState) {super.onCreate (savedInstanceState); //setContentView(R.layout.listview); Bundle = getIntent (). GetExtras (); This.mJSON = the.getString ("JSON"); Logs. I ("ListViewenton", This.MJSON); {JSONObject UrbJSON = Try new JSONObject (mJSON); JSONObject UrbQuery = UrbJSON.getJSONObject ("query"); Int line = UrbQuery.getInt ("line"); Logs. I ("UrbRows", string format ("% d", rows)); JSONArray ResultsRay = UrbJSON.getJSONArray ("Result"); This.listRows = new string [rows]; (Int i = 0; i & lt; rows; i ++) {this.listRows [i] = resultsArray.getJSONObject (i) GetString ("BUSINESS_NAME") toString (). } This.listRowsURI = new string [rows]; For (int i = 0; i
}
getApplicationContext all events Delete ()
In your code, things will work better for you ListViewer
is a reference
- just use it in your toast
.
WebView
, I think you might be making a better service that its own activity and onListItemClick ()
.
Comments
Post a Comment