I\'m developing a PopUp window for Android, and it\'s working, I added a EditText and a Button on that, when running on ADV this work properly, while running on device, when I f
Edited
try like this create a new class say Popupcls
public class PopUpFlag {
private PopupWindow pw;
public void initiatePopupWindow(Activity ctx) {
LayoutInflater inflater = (LayoutInflater) ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View layout = inflater.inflate(R.layout.popupprofile, (ViewGroup) ctx.findViewById(R.id.popup_element));
EditText ettext = (EditText) layout.findViewById(R.id.edit);
pw = new PopupWindow(layout, 300, 400, true);
pw.showAtLocation(layout, Gravity.BOTTOM, 0, 0);
}
Now in your activity if you need popup when popup button click write like this
popupbtn.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
PopUpFlag puf=new PopUpFlag();
puf.initiatePopupWindow(YourActivityName.this);
}
});
I hope this helps