Reputation: 1632
I am giving user to change background color of edit textview. I want also give user to chance for set opacity of color. My edit text XML code is like below
<EditText
android:id="@+id/text_quotes"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:gravity="center"
android:textStyle="bold"
android:textColor="?attr/colorPrimaryDark"
android:shadowRadius="0"
android:text="Text"
android:textCursorDrawable="@null"
android:textSize="@dimen/newMainText" />
Let me know if someone have idea to set opacity of change background color of this view. Thanks a lot !
Upvotes: 0
Views: 1295
Reputation: 3838
You can try using this alpha, it gives you the opacity, programmatically
youredittext.getBackground().setAlpha(45);
Upvotes: 2