Error declaring ArrayAdapter as public (global) [closed]

-1

I have an error in declaring ArrayAdapter as public (global), when I do it within a method it works perfect, but since public0 gives the following error.

Someone helps me solve it please.

    
asked by Javier 16.11.2017 в 02:44
source

1 answer

0

To make it public, declare it as follows:

 //Esto va donde lo tienes declarado ahora...
 public ArrayAdapter <String> adaptador = null;

 @public void onCreate(Bundle SavedInstance){

    //Dentro del metodo
    adaptador = new AarrayAdapter(this, android.R.Layout.simple_list_item_1, datos);        
 }

Try it and see if it worked for you.

    
answered by 16.11.2017 / 03:05
source