Skip to content

Commit

Permalink
Merge pull request #2 from limuyang2/patch-1
Browse files Browse the repository at this point in the history
Update CommentDialogFragment.java
  • Loading branch information
ZoeyWoohoo authored Dec 21, 2017
2 parents 1013797 + fb33603 commit 9b02b60
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,15 @@ public Dialog onCreateDialog(Bundle savedInstanceState) {
sendButton = (ImageView) mDialog.findViewById(R.id.image_btn_comment_send);

fillEditText();
setSoftKeyboard();
// setSoftKeyboard();
commentEditText.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
Log.i("commentEditText","onGlobalLayout");
InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(getActivity().INPUT_METHOD_SERVICE);
imm.showSoftInput(commentEditText, 0);
}
});

commentEditText.addTextChangedListener(mTextWatcher);
photoButton.setOnClickListener(this);
Expand Down

0 comments on commit 9b02b60

Please sign in to comment.