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

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -