@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; } }
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); }
@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(""); } }
void setHint(String hint) { SmileyPickerUtility.showKeyBoard(editTextFastReply); // editTextFastReply.setHint(Html.fromHtml(hint)); textViewHint.setText(Html.fromHtml(hint)); }
public void hide() { SmileyPickerUtility.hideSoftInput(editTextFastReply); if (layoutSmile.getVisibility() == View.VISIBLE) { layoutSmile.setVisibility(View.GONE); } }
public void show() { SmileyPickerUtility.showKeyBoard(editTextFastReply); }