How To Create Pop Up Window In Android - Faster Method

Filip Vujovic · 51K views · 2015 · 4:40

Open on YouTube

Software (other)Web developmenttutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as a quick worked example of creating a PopupWindow in Android, both in answers and in questions that start from the tutorial's code.

Recommended by 1 people across 1 different months, 2016 to 2020.

What it is

A short 2015 Android tutorial by Filip Vujovic showing how to build a pop up window using the built-in PopupWindow widget. It is presented as a faster alternative to his earlier tutorial that used a separate Activity for the popup.

What people said

Recommends K_mns · 2020-11 · Stack Overflow · on “How to open a text box in android studio?”

These were helpful in learning how to make a popup window: PopupWindow documentation [LINK] How To Create Pop Up Window In Android (YouTube video) [this video] Android Popup Window Example [LINK]

Cites DaveNOTDavid · 2016-04 · Stack Overflow · on “Disabling the back button for popup windows”

Based on a YouTube tutorial video ( [this video] ) that teaches how to create popup windows, I was wondering how to dismiss the popup with a touch event as opposed to the back button... Here's MainActivity: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); RelativeLayout relative = (RelativeLayout)findViewById(R.id.relativeTest); Button button = (Button)findViewById(R.id.button); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { LayoutInflater layoutInflater = (LayoutInflater) getApplicationContext(). getSystemService(LAYOUT_INFLATER_SERVICE); ViewGroup container =

Cites Suragch · 2018-05 · Stack Overflow · on “How to create a popup window (PopupWindow) in Android”

How to make a simple Android popup window This is a fuller example. It is a supplemental answer that deals with creating a popup window in general and not necessarily the specific details of the OP's problem. (The OP asks for a cancel button, but this is not necessary because the user can click anywhere on the screen to cancel it.) It will look like the following image. [LINK] Make a layout for the popup window Add a layout file to res/layout that defines what the popup window will look like. popup_window.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android=" [LINK] " android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#62def8"> <T