Ejemplo n.º 1
0
 private void uploadFeedBackInfo() {
   String content = etContent.getText().toString();
   if (TextUtils.isEmpty(content)) {
     showDialog(
         content, getResources().getString(R.string.please_input_suggestion), TYPE_FAIL_FEED_BACK);
   } else {
     showDialog(
         content, getResources().getString(R.string.feed_back_hint), TYPE_SUCCESS_FEED_BACK);
   }
 }
Ejemplo n.º 2
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;
          }
        });
  }