Page 121 - 3-2
P. 121

// Get listview
                    ListView lv_tb1 = getListView();


                    // on seleting single product
                    // launching Edit Product Screen
                    lv_tb1.setOnItemClickListener(new AdapterView.OnItemClickListener() {


                        @Override
                        public void onItemClick(AdapterView<?> parent, View view,
                                                int position, long id) {
                            // getting values from selected ListItem


                            Log.d(" 여긴가", "8.1_delete 로 이동하자");


                            Log.d(" 여긴가", "8.2_delete 로 이동하자");


                            String delete_code = ((TextView) view.findViewById(R.id.txtcode)).getText()
                                    .toString();


                            // Starting new intent
                            Intent in = new Intent(getApplicationContext(),
                                    MainActivity_delete.class);
                            // sending pid to next activity
                            in.putExtra(TAG_CODE, delete_code);


                            Log.d(" 여긴가", "8.3_delete 로 이동하자");
                            Log.d(" 여긴가", delete_code);


                            // starting new activity and expecting some response back
                            startActivityForResult(in, 100);




                        }
                    });


                }


                public void onbtn_purcharseClicked(View view) {
                    String total_price= String.valueOf(all_price);
                    Intent intent = new Intent(getApplicationContext(),MainActivity_purcharse.class);
                    intent.putExtra(TAG_PRICE, total_price);
                    Log.d(" 여긴가", "9.1_purcharse 로 이동하자");
                    Toast.makeText(getApplicationContext(),          " 계산           화면으로             전환됩니
            다.",Toast.LENGTH_LONG).show();


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