I made a similar dialog box (xml layout), that exists in a linear layout. and i want this linear layout to be shifted when soft keyboard is ON.

EDIT: I want it to appear just like the WhatsApp dialog box is appearing in the image.
SOLVED:
The problem was because the PARENT was RelativeLayout ( which was occupying the entire screen ) , therefore, after adding what @Enigma suggested below in the manifest file, and removing the parent layout which is relative layout and making LinearLayout containing the dialog box only, the parent.
In AndroidManifest.xml for that particular Activity, add this attribute
android:windowSoftInputMode="stateVisible|adjustResize"That must work.