user2582318 user2582318 - 1 year ago 109
Android Question

ImageView slow when setImageResource

since ShowCaseView development is discontinued, i chose for another way to make the First Tour in my Application, the way is:

i took 7 screen shots from my Galaxy G4 for each screen and made some text in it and display it in a imageView in the first run.

But when i change the image (the user click in a next tip button), it take ages to change and buggy the app, in the tablet(10.1) it work well(i dont know why since the tablet has low processor than the g4)

the images are in a good quality(HD), size is 720:1280, if i change the size to something like 500x600 or smaller, it change faster, but in the tablet the image looks horrible ugly

im using this to change;

btnNextTip.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {

is there any way to do this? or another good library to do a first tour? or change the images but it not look VGA screenshots ?


Answer Source

A good approach would be to seperate your Image Resources so that one with Higher Quality are used for Tablet and one with Lower resolution for your Phones.

You App can detect the screen size of the Device that your App is installed on and based on that, it will choose which image resolution to display.

Check here for details: Supporting Multiple Screen sizes - Android Developer

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download