use popup window for this type of options: llBack.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { showPopupMenu(); } }); and the showPopupMenu() method is: public void showPopupMenu() { LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE); View popupView = inflater.inflate(R.layout.add_file_lay, this.container, false); popupWindow = new PopupWindow(popupView, popupwidth, WindowManager.LayoutParams.WRAP_CONTENT, true); popupWindow.setOutsideTouchable(true); popupWindow.setBackgroundDrawable(new BitmapDrawable()); popUpwindowinIt(popupView); popupWindow.showAsDropDown(findViewById(R.id.places), 0, 0); } … Read more