I am loading a new image into an imageview when the stop and play button is pressed. They toggle back and forth. However when I set the image source in my code is appears really wrong.
Before

Then I call
bottomBar.setImageResource(R.drawable.bottombuttonsstop);
End Result

Layout XML
<LinearLayout
android:id="@+id/bottomBarBox"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<ImageView
android:id="@+id/bottomBar"
android:layout_width="match_parent"
android:background="@drawable/bottombuttons"
android:layout_height="wrap_content" />
</LinearLayout>
Obviously this is not loading correctly for some reason, any ideas?
Try to call
setBackgroundResourceinstead ofsetImageResourceor setandroid:srcin a layout file