Answer the question
In order to leave comments, you need to log in
How to execute the code before the user sees the activity?
You need to execute code that will change the ImageView's bitmap before the user sees the activity. The code needs to be executed once when the application starts. The application has one single activity.
PS New to android.
PPS Google - all attempts led to the crash of the application.
Answer the question
In order to leave comments, you need to log in
Execute it in onCreate of your activity. In order for the code to be executed once at startup (but at the same time every startup) - keep the flag whether the conversion was performed somewhere in your Application implementation, for example. If you need to do it once at all, then you can write it to a file, or somewhere else.
You can of course try to execute the code in onCreate of the Application itself.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question