D
D
DARKENN2020-02-15 14:25:12
Java
DARKENN, 2020-02-15 14:25:12

How to set Recycler view padding on button click?

button_open_chat.setOnClickListener(new OnClickListener() {
            public void onClick(View view) {
                ((ConstraintLayout.LayoutParams)mMessagesRecycler.getLayoutParams()).bottomToBottom = 140;
                button_open_chat.setVisibility(View.INVISIBLE);
                sendText.setVisibility(View.VISIBLE);
                buttonSend.setVisibility(View.VISIBLE);
                sendText.requestFocus();
                InputMethodManager keyboard = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
                keyboard.showSoftInput(sendText, 0);
    }
        });

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question