Page 122 - 3-2
P. 122

Log.d(" 여긴가", "9.2_purcharse 로 이동하자");
                    startActivity(intent);


                    total_all_conpare_price=total_all_conpare_price+all_price;
                }


                // Response from Edit Product Activity
                @Override
                protected void onActivityResult(int requestCode, int resultCode, Intent data) {
                    super.onActivityResult(requestCode, resultCode, data);
                    // if result code 100
                    if (resultCode == 100) {
                        // if result code 100 is received
                        // means user edited/deleted product
                        // reload this screen again
                        Intent intent = getIntent();
                        finish();
                        startActivity(intent);
                    }


                }


                /**
                 * Background Async Task to Load all product by making HTTP Request
                 * */
                class LoadAllProducts extends AsyncTask<String, String, String> {


                    /**
                     * Before starting background thread Show Progress Dialog
                     * */
                    @Override
                    protected void onPreExecute() {
                        super.onPreExecute();
                        pDialog = new ProgressDialog(MainActivity_allproducts.this);
                        pDialog.setMessage("Loading products. Please wait...");
                        pDialog.setIndeterminate(false);
                        pDialog.setCancelable(false);
                        pDialog.show();


                        Log.d(" 여긴가", "7.2_allproducts");
                    }


                    /**
                     * getting All products from url
                     * */


                                                         - 122 -
   117   118   119   120   121   122   123   124   125   126   127