i get a problem using android:state_pressed with picasso
this is my code on my Activity :
Picasso.with(getApplicationContext()).load(R.drawable.btnStart)
.into(imgStart);
here on btnStart XML :
<?xml version="1.0" encoding="utf-8"?>
<item android:drawable="@drawable/resepsi" android:state_pressed="false" android:state_selected="false"/>
<item android:drawable="@drawable/resepsiblack" android:state_pressed="true"/>
<item android:drawable="@drawable/resepsi" android:state_pressed="false" android:state_selected="true"/>
and last on my layout xml i put an imageview like this :
<ImageView
android:id="@+id/imgStart"
android:layout_width="150dp"
android:layout_height="60dp"
android:layout_centerHorizontal="true"
android:contentDescription="@string/start" />
i've tried some answer from here but still not working, even the imageview not rendering.
can anyone give me some example how to use picasso with selector state for imageview ?
thanks in advance
No comments:
Post a Comment