Hiển thị các bài đăng có nhãn Development. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn Development. Hiển thị tất cả bài đăng

Android Activity Life Cycle

Simple straight forward explanation to android activity life cycle

Learn Android
Learn Android


When you enter your app, the life cycle flow will be like this:

onCreate() -> onStart() -> onResume()


Now if you are using an intent to move from your current Activity to the next Activity, these are the methods of the current activity that will be executed:

onPause() -> onStop()

When you come back to the same activity(e.g., using back key event), these are the methods of the current activity that will be executed:

onStart() -> onResume()

And when you exit your app, the flow goes like this:

onPause() -> onStop() -> onDestroy()

source

Bitmap too large to be uploaded into a texture

Problem: “Bitmap too large to be uploaded into a texture”Got this error when I tried to run an application from eclipse to physical device.
On googling, found that it relates to some size limit of image for OpenGL hardware textures (2048x2048). But that wasn't the reason in my case. Actually in my case, image was less than 2048 for both x and y dimensions.



Analysis: I found that image was in drawable folder and Android system assumes drawable as mdpi and then take decision for scaling them down or up according to other resolutions.

Solution: Moved image to new folder named drawable-nodpi and the problem gone.