Where is my error?

-1

I'm playing a game on Android pretty simple, but I'm having trouble with the interface.

I created the interface in xml, and set the java class corresponding to it (setContentView ...), until then ok. But I want it to be called when the Activity is called, some images are set.  

asked by anonymous 19.10.2017 / 03:25

1 answer

0

As far as I know you should instantiate the views in the OnCreate() method since it has the layout of xml , try to put all findViewById in OnCreate() (you can leave it declared out as it is, so others methods can also use them), the screen should be completely black because you instantiated wrong your views, therefore, not to match them any image. You also do not call your method preparaTudo() so even if it was all right I think the screen would still be black (I program in Xamarin.Android , but the logic is the same for what I know, including just putting out the method it already points out an error ).

    
19.10.2017 / 04:31