Skip to content

Instantly share code, notes, and snippets.

@selmanon
Created November 28, 2014 10:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save selmanon/768d0a1001fcff31d390 to your computer and use it in GitHub Desktop.
Save selmanon/768d0a1001fcff31d390 to your computer and use it in GitHub Desktop.
popWindow
@OnClick(R.id.rl_vision)
public void popWindowVision(View view) {
MainApplication.backEnabled = false;
LayoutInflater layoutInflater
= (LayoutInflater) getActivity().getBaseContext()
.getSystemService(getActivity().LAYOUT_INFLATER_SERVICE);
View popupView = layoutInflater.inflate(R.layout.popup_window_vision, null);
final PopupWindow popupWindow = new PopupWindow(
popupView,
AbsoluteLayout.LayoutParams.FILL_PARENT,
AbsoluteLayout.LayoutParams.WRAP_CONTENT);
Button button = (Button)popupView.findViewById(R.id.button);
button.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v) {
popupWindow.dismiss();
MainApplication.backEnabled = true;
}
});
popupWindow.showAtLocation(mRlVision, Gravity.CENTER, 0, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment