How my imageview is drawing the new image over the old image:

Discussion in 'Graphics & Multimedia' started by Katypeterson, Jan 16, 2014.

  1. #1
    My imageview is drawing the new image over the old image:
    My image view:

    <ImageView
    android:id="@+id/next_pat"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerVertical="true"
    android:layout_alignParentRight="true"
    android:layout_marginRight="20dp"
    android:background="@drawable/next_btn" />


    For certain reason, I changed the image resource by using
    save.setImageResource(R.drawable.save_btn);
    but the new image is drawing over the old image.
    I have used Fragment not Activity.

    How to clears the old image and set the new image?

    I also tried the below code,
    save.setImageResource(o);
    save.setImageResource(R.drawable.save_btn);
    but it is not working.
     
    Katypeterson, Jan 16, 2014 IP
  2. Pantho Bihosh

    Pantho Bihosh Member

    Messages:
    22
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    33
    #2
    hello ketypeterson
    in res folder there have some image folder like
    xhdpi
    ldpi etc
    delete the old image from all of the folder above with new image
    this error cause your device resolution is corresponds to ur res folder hdpi
    thank you
     
    Pantho Bihosh, Jan 26, 2014 IP