Page 790 - 3-2
P. 790

import java.net.URLConnection;
            import java.net.URLEncoder;


            public class RentActivity extends AppCompatActivity {


                TextView text;
                Typeface font1;


                private String umbrella;
                private String rent;


                @Override
                protected void onCreate(Bundle savedInstanceState) {
                    super.onCreate(savedInstanceState);
                    setContentView(R.layout.activity_rent);


                    text = (TextView) findViewById(R.id.textView1);
                    font1 = Typeface.createFromAsset(getAssets(), "DXAbtB-KSCpc-EUC-H.ttf");
                    text.setTypeface(font1);
                }


                public void onClick_umbrella1(View view) {
                    umbrella="1";
                    insertoToDatabase(umbrella);
                    SystemClock.sleep(3000);
                    rent="A";
                    rent_db(rent);
                    SystemClock.sleep(3000);
                    rent="0";
                    rent_db(rent);


                    Intent intent20 = new Intent(getApplicationContext(),Popup.class);
                    startActivity(intent20);
                    finish();
                }


                public void onClick_umbrella2(View view) {
                    umbrella="2";
                    insertoToDatabase(umbrella);
                    SystemClock.sleep(3000);
                    rent="A";
                    rent_db(rent);
                    SystemClock.sleep(3000);
                    rent="0";
                    rent_db(rent);


                                                         - 790 -
   785   786   787   788   789   790   791   792   793   794   795