Skip to content

Integrate without emotions in a fragment #1

Open
@ghost

Description

Dear,

Thanks a lot for the amazing work,

But I have tried to add the keyboard to my own project without the emotion but it did not work, still the keyboard move the whole activity up:
what I did
private void enableFooterView() {

    final ImageButton postButton = (ImageButton) this.currentView
            .findViewById(R.id.imgBtnPostReply);

    postButton.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            if (content.getText().toString().length() > 0) {

            }

        }
    });
}





/**
 * change height of emoticons keyboard according to height of actual
 * keyboard
 * 
 * @param height
 *            minimum height by which we can make sure actual keyboard is
 *            open or not
 */
private void changeKeyboardHeight(int height) {

    if (height > 100) {
        keyboardHeight = height;
        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
                LayoutParams.MATCH_PARENT, keyboardHeight);
        emoticonsCover.setLayoutParams(params);
    }

}

/**
 * Checking keyboard height and keyboard visibility
 */
int previousHeightDiffrence = 0;

private void checkKeyboardHeight(final View parentLayout) {

    parentLayout.getViewTreeObserver().addOnGlobalLayoutListener(
            new ViewTreeObserver.OnGlobalLayoutListener() {

                @Override
                public void onGlobalLayout() {

                    Rect r = new Rect();
                    parentLayout.getWindowVisibleDisplayFrame(r);

                    int screenHeight = parentLayout.getRootView()
                            .getHeight();
                    int heightDifference = screenHeight - (r.bottom);

                    previousHeightDiffrence = heightDifference;

                }
            });
}

And calling the enablefooter(), changeHieght in OnCreate Function

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions