Solution 1 :
for creating something like this in android you can use alertDialog with custom layout and blur the background:
custom_layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns_android="http://schemas.android.com/apk/res/android"
android_orientation="vertical"
android_paddingLeft="30dp"
android_paddingRight="30dp"
android_layout_width="match_parent"
android_layout_height="match_parent">
<ImageView
android_id="@+id/imageView"
android_layout_width="match_parent"
android_layout_height="wrap_content"/>
<LinearLayout
android_orientation="horizontal"
android_paddingLeft="10dp"
android_paddingRight="10dp"
android_layout_width="match_parent"
android_layout_height="wrap_content">
<Button
android_id="@+id/button1"
android:layout_below
android_layout_width="wrap_content"
android_layout_height="wrap_content"/>
<Button
android_id="@+id/button2"
android_layout_width="wrap_content"
android_layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
in Activity:
//create an alert builder
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Name"); //you can add this to your custom layout only
// set the custom layout
final View view = getLayoutInflater().inflate(R.layout.custom_layout, null);
builder.setView(view);
Button button1 = (Button) view.findViewById(R.id.button1); // etc.. for button2,3,4.
// onclick functions
// create and show the alert dialog
AlertDialog dialog = builder.create();
dialog.show();
for blur background, you can add a theme like https://stackoverflow.com/a/41373144/7364284 but, I would suggest using window attributes like https://stackoverflow.com/a/10381077/7364284 because of its less code and easy to use.
Problem :
I want to implement something like what instagram does here.
Upon long pressing on a post it opens up another view on top the screen to show the post and makes the remaining part of the screen blur.
Comments
Comment posted by code.tutsplus.com/tutorials/…
Check out this article. It shows different types of dialogs as examples: