2
Guys I’m making an app on android and inside it has a listiView
fixed sent by a string array for example
String[] servicos = {"Eletricista", "Pedreiro", "Pintor", "Encanador", "Arquiteto", "Engenheiro", "Marcineiro", "Serralheiro"};
In my application I would like the user who works within your respective area to register and be added within your area, I already have the ready form
example of the situation -> an electrician register and his name is played directly on Activity
electrician.
How do I make for the sqlite
take the dice and play inside their respective Activity
.
The project is of the course .
I’m sorry if I said something stupid android
To use
Class.forName(tipo)
do so:try {Class classe = Class.forName("NomeDaPackage.NomeDaActiviy");startActivity(new Intent(MainActivity.this, classe));} catch (ClassNotFoundException e) {e.printStackTrace();}
. However, to avoid theswitch/case
, the array must have the name of the corresponding Activity class.– ramaral
Supplemented answer, did not work with me because I did not put the package name as well
– Costamilam
If the question has been answered, close it, otherwise state your doubts please
– Costamilam