Page 90 - 3-2
P. 90

Intent i = new Intent(getApplicationContext(),
                                        MainActivity_tag.class);
                                // Closing all previous activities
                                i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                                startActivity(i);
                            }
                        } catch (JSONException e) {
                            Log.d(" 오류남: ", e.getMessage());
                            Log.d(" 여긴가", "7.3333333_  설마 너 jsonexception   이니.....?");
                            e.printStackTrace();
                        }


                        return null;
                    }


                    /**
                     * After completing background task Dismiss the progress dialog
                     * **/
                    protected void onPostExecute(String file_url) {
                        // dismiss the dialog after getting all products
                        pDialog.dismiss();
                        // updating UI from Background Thread
                        runOnUiThread(new Runnable() {
                            public void run() {
                                /**
                                 * Updating parsed JSON data into ListView
                                 * */
                                ListAdapter adapter = new SimpleAdapter(
                                        MainActivity_allproducts.this, productsList,
                                        R.layout.list_item, new String[] { TAG_CODE,
                                        TAG_NAME,TAG_NUM,TAG_PRICE},
                                        new int[] { R.id.txtcode, R.id.txtname,R.id.txtnum,R.id.txtprice});
                                Log.d(" 여긴가", "7.4_allproducts");
                                // updating listview
                                setListAdapter(adapter);




                              // Intent go = new Intent(getApplicationContext(),MainActivity_tag.class);
                              // startActivity(go);
                            }
                        });


                    }


                }


                                                         - 90 -
   85   86   87   88   89   90   91   92   93   94   95