I want my Edittext to grey-out less or more than standard when disabled with editTxtV.setEnabled(false). Oviously the disableAlpha-Property does exactly this. But using android:disabledAlpha="2.0" like this in layout.xml
<EditText android:inputType="numberDecimal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/EditTextV" android:text="1" android:disabledAlpha="2.0" ></EditText>
do not change the behaviour at all.
Hot do I correctly change "how much to grey out"?
Sebastian
PS: One idea is to make a custom View extending EditText. In the constructor I get attrs AttributeSet and give that back to super.constructor, but how to change the disableAlpha-attribute on its way through my constructor?
Alpha values should range from 0.0 to 1.0, any values greater than 1.0 is considered as 1.0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With