Guys, does anyone know what call or perform this technique in the studio Android?

Asked

Viewed 116 times

-2

I want to make an APP for gym and need to use a smaller screen in front of the main screen as shown in the print of an existing APP that is attached. I want to blur the background and show a smaller screen in front with what I want. Does anyone have an idea of how to do or where to look? I appreciate.

imagem para exemplo

2 answers

1


This "technique" is the AlertDialog, it comes on Android itself and is quite easy to be implemented, by default it only allows title, text and three types of buttons (positive, negative and neutral), but you can customize creating your own layout .xml and manually inflating and configuring it. Documentation link: https://developer.android.com/guide/topics/ui/dialogs.html?hl=pt-br. And here is a great tutorial that explains how to use Alert "pattern" or how to customize it: https://www.devmedia.com.br/android-dialog/26749

  • Damn, man. Thank you. That’s exactly it.

0

private void alertaexemplo(int position) {
new AlertDialog.Builder(this).setTitle("meu titulo")
    .setMessage("Mensagem")
    .setPositiveButton("sim", new DialogInterface.OnClickListener() {
        @Override
        public void onClick(DialogInterface dialogInterface, int i) {
            //Ação// 
        }
    })
    .show();

}

A very simple example that you can edit as you need! And if you are using Android Studio you can download a sample code.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.