Guys, does anyone know how to call or perform this technique in Android studio?

-2

I want to make a gym APP and I 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 leave the background unfocused and show a smaller screen at the front with what I want. Anyone have an idea how to do it or where to look? Appreciate.

    
asked by anonymous 30.03.2018 / 23:53

2 answers

1

This "technique" is AlertDialog , it comes in Android itself and is very easy to implement, by default it only allows title, text and three types of buttons (positive, negative and neutral), but you can customize it by creating your own .xml layout and inflating and configuring it manually. Documentation link: link . And here's a great tutorial that explains how to use the "standard" Alert or how to customize it: link

    
31.03.2018 / 00:26
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 it! And if you're using Android Studio you can download a sample code.

    
31.03.2018 / 02:41