Пример #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
 @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("");
   }
 }
Пример #3
0
 public void hide() {
   SmileyPickerUtility.hideSoftInput(editTextFastReply);
   if (layoutSmile.getVisibility() == View.VISIBLE) {
     layoutSmile.setVisibility(View.GONE);
   }
 }