Page 99 - 3-3
P. 99

sharedPreferences pret = getSharedPreferences("pref", MODE_PRIVATE);
                              ips = pref.getString("ipd", "");
                      }


                      @Override
                      public void onClick(View v) {
                              switch (v.getld()) {
                                      case R.id.homeBtn:
                                              // 홈버튼
                                              if (flag != 0) {
                                                      th.Close();
                                                      flag = 0;
                                              }
                                              Intent startIntent = new Intent(this, MainActivity.class);
                                              startIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                                              startActivity(startIntent);
                                              break;
                                      case R.id.delBtn:
                                              db.resetLog();
                                              // 데이터베이스 초기화
                                              break;
                                      case R.id.lightBtn:
                                              // 현재 화면 밝기 최대
                                              WindowManager.LayoutParams                 iparam             =
              getWindow().getAttributes();
                                              if (I == 0) {
                                                      iparam.screenBrightness = -1;
                                               // iparam.screenBrightness = -1;
                                                      getWindow().setAttributes(iparam);
                                                      I = I + 1;
                                              } else if (I == 1) {
                                                      iparam.screenBrightness = 1f;
                                                      getWindow().setAttributes(iparam);
                                                      I = 0;
                                              } else {
                                              }
                                              Log.d("TAG", "LIGHT");


                                              break;
                              }
                      }


                      @Override
                      public void finish() {
                              if (FinishFlag == false) {


                                                           - 99 -
   94   95   96   97   98   99   100   101   102   103   104