xamarin.android - selector state_enabled=false not working -
i have simple selector textview:
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_enabled="false" android:state_pressed="false" android:drawable="@color/darkgray" /> <item android:state_pressed="true" android:state_enabled="true" android:drawable="@color/background_red_down" /> <item android:drawable="@color/background_red" />
i using mvvmcross textview enabled property binded property:
<textview local:mvxbind="click recomenddishviewmodel.sendcommand; enabled recomenddishviewmodel.issendpostenabled" android:text="@string/sendlabel" android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/sendbutton" android:textsize="24dp" android:clickable="true" android:duplicateparentstate="true" android:gravity="center_horizontal" android:paddingtop="5dp" android:paddingbottom="5dp" android:background="@drawable/selector_red_button_background" android:textcolor="#ffffffff" android:enabled="false" />
the pressed state works enabled=false state partially working, in fact disabled, pressing on nothing, still stays in red color. funny thing when set android:enabled="false" can see turn gray in desiger.
any ideas?
thanks
amit
Comments
Post a Comment