コード例 #1
0
 @Override
 public void onClick(View v) {
   switch (v.getId()) {
     case R.id.button_reply_send:
       if (!ChhApplication.getInstance().isLogin()) {
         ToastUtil.show(getActivity(), R.string.need_login);
         startActivity(LoginActivity.getStartIntent(getActivity()));
         return;
       }
       if (mQuoteReply != null) {
         quoteReply();
       } else {
         reply();
       }
     case R.id.button_smile:
       if (layoutSmile.getVisibility() == View.VISIBLE) {
         SmileyPickerUtility.showKeyBoard(editTextFastReply);
         layoutSmile.setVisibility(View.GONE);
       } else {
         int height = SmileyPickerUtility.getKeyboardHeight(getActivity());
         LinearLayout.LayoutParams params =
             (LinearLayout.LayoutParams) layoutSmile.getLayoutParams();
         params.height = height;
         layoutSmile.setVisibility(View.VISIBLE);
         SmileyPickerUtility.hideSoftInput(editTextFastReply);
       }
       break;
     default:
       break;
   }
 }
コード例 #2
0
  public void setPlateAndThread(Plate plate, Thread thread) {
    this.mQuoteReply = null;
    this.mPlate = plate;
    this.mThread = thread;
    SmileyPickerUtility.showKeyBoard(editTextFastReply);
    String hint = "回复: " + thread.getTitle();

    setHint(hint);
  }
コード例 #3
0
 @Override
 public void onSuccess(PostListWrap result) {
   if (getActivity() != null && result != null) {
     Toast.makeText(getActivity(), "回复成功", Toast.LENGTH_SHORT).show();
     SmileyPickerUtility.hideSoftInput(editTextFastReply);
     hide();
     if (onReplySuccess != null) {
       onReplySuccess.onSuccess(result.getPosts());
     }
     editTextFastReply.setText("");
   }
 }
コード例 #4
0
 void setHint(String hint) {
   SmileyPickerUtility.showKeyBoard(editTextFastReply);
   // editTextFastReply.setHint(Html.fromHtml(hint));
   textViewHint.setText(Html.fromHtml(hint));
 }
コード例 #5
0
 public void hide() {
   SmileyPickerUtility.hideSoftInput(editTextFastReply);
   if (layoutSmile.getVisibility() == View.VISIBLE) {
     layoutSmile.setVisibility(View.GONE);
   }
 }
コード例 #6
0
 public void show() {
   SmileyPickerUtility.showKeyBoard(editTextFastReply);
 }