Note that there are some explanatory texts on larger screens.

plurals
  1. PODebugging with breakpoints never enters subclass
    primarykey
    data
    text
    <p>My listview is not being populated with the data I am pulling from a MySQL database. I have tested the web service and everything is perfect. I was debugging it and I noticed that when I set a breakpoint inside my asynctask it never went there. I stepped from the execute command and it never went inside. Everything runs fine with no errors. I am confused and new, please be gentle. </p> <pre><code>public class Favorites extends Activity{ UserFunctions userFunctions = new UserFunctions(); ArrayList&lt;String&gt; zipcodes = new ArrayList&lt;String&gt;(0); ArrayAdapter&lt;String&gt; arrayAdapter1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.favoritespage); arrayAdapter1 = new ArrayAdapter&lt;String&gt;(Favorites.this,android.R.layout.activity_list_item,zipcodes); new DownloadDataTask().execute(); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.activity_main_screen, menu); return true; } private class DownloadDataTask extends AsyncTask&lt;JSONArray, JSONArray, ArrayList&lt;String&gt; &gt; { @Override protected ArrayList&lt;String&gt; doInBackground(JSONArray... params) { JSONArray json = userFunctions.ziplistrequest("37.5", "140.45", "20"); for(int i=0; i &lt; json.length() ; i++) { JSONObject jarray = null; try { jarray = json.getJSONObject(i); String zip = jarray.getString("ZIPCODE"); zipcodes.add(zip); arrayAdapter1.add(zip); Log.d(zip,"Output"); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } } return zipcodes; } protected void onPostExecute(){ ListView listView = (ListView) findViewById(R.id.list); listView.setAdapter(arrayAdapter1); } } </code></pre> <p>If any additional answers are needed please let me know.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload