コード例 #1
0
  @Override
  protected void postInitUI() {
    super.postInitUI();
    mAdapter = new AlarmListAdapter(this);
    mAdapter.setCache(controller.getCache());
    controller.addObserver(mAdapter);
    mAdapter.setClockAction(controller);
    lvAlarm.setAdapter(mAdapter);
    lvAlarm.setOnItemClickListener(
        new OnItemClickListener() {

          @Override
          public void onItemClick(AdapterView<?> parent, View view, int position, long id) {

            Log.d(Clock.TAG, "default click");
            TemporaryData.save(Clock.class.getName(), controller.getCache().read().get(position));
            TemporaryData.save(ClockController.class.getName(), controller);
            AlarmEditActivity.callMe(AlarmListActivity.this);
          }
        });
    lvAlarm.setOnItemLongClickListener(
        new OnItemLongClickListener() {
          @Override
          public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
            showDialog(controller.getCache().read().get(position));
            return true;
          }
        });
    controller.checkDefaultClockPolicy();
  }
コード例 #2
0
 @Override
 protected void initUI() {
   super.initUI();
   setContentView(R.layout.activity_alarm_main);
   lvAlarm = (ListView) findViewById(id.lv_alarm);
   updateUI();
 }
コード例 #3
0
  @Override
  protected void preLoadData(Bundle savedInstanceState) {
    super.preLoadData(savedInstanceState);

    account = AccountProxy.getInstance().getCurrentAccount();

    /** 获取身体状况资料 */
    mBodyStateTask =
        new EditQAHealthTask(account.getAccessToken(), null, null, null, true, "sick_");
    mBodyStateTask.setProgress(
        new CustomDialogProgress(this, getString(string.punlic_personal_loading)));
    mBodyStateTask.setTaskHost(
        new TaskHost() {
          @Override
          public void onPostExecute(int requestCode, BaseResult result) {
            super.onPostExecute(requestCode, result);
            switch (result.getErrorCode()) {
              case LocalCode.CODE_SUCCESS:
                bodyStates = QAHealth.createQAHealthList((NetworkClientResult) result);
                AccountPreference.getInstance().saveBodyState(bodyStates);
                fillView();
                break;
              default:
                ErrorDialogUtil.showErrorToast(
                    SettingChangeBodyStateActivity.this,
                    CloudStatusCodeProxy.TYPE_SETTING,
                    result.getErrorCode());
                finish();
                break;
            }
          }
        });
    mBodyStateTask.execute();
  }
コード例 #4
0
 @Override
 protected void onDestroy() {
   // TODO Auto-generated method stub
   super.onDestroy();
   PropertyCenter.getInstance().removePropertyChangeListener(this);
   if (controller != null) {
     if (mAdapter != null) {
       controller.deleteObserver(mAdapter);
       mAdapter = null;
     }
     controller.clearCache();
     controller = null;
   }
 }
コード例 #5
0
  @Override
  protected void postInitUI() {
    super.postInitUI();
    etContent.setOnKeyListener(
        new OnKeyListener() {

          @Override
          public boolean onKey(View v, int keyCode, KeyEvent event) {
            if (keyCode == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_DOWN) {
              uploadFeedBackInfo();
              return true;
            }
            return false;
          }
        });
  }
コード例 #6
0
 @Override
 protected void preInitUI() {
   super.preInitUI();
   initActionBar();
 }
コード例 #7
0
 @Override
 protected void preLoadData(Bundle savedInstanceState) {
   super.preLoadData(savedInstanceState);
   PropertyCenter.getInstance().addPropertyChangeListener(this);
   controller = new ClockController();
 }
コード例 #8
0
 @Override
 protected void onStop() {
   super.onStop();
 }
コード例 #9
0
 @Override
 protected void onStart() {
   super.onStart();
 }
コード例 #10
0
 @Override
 protected void initUI() {
   super.initUI();
   setContentView(R.layout.activity_setting_feed_back);
   etContent = (CleanableEditText) this.findViewById(R.id.ce_feed_back);
 }
コード例 #11
0
 @Override
 protected void preLoadData(Bundle savedInstanceState) {
   super.preLoadData(savedInstanceState);
   currentAccount = AccountProxy.getInstance().getCurrentAccount();
   agent = new FeedbackAgent(this);
 }