當用戶選擇複製粘貼的文本時,如何更改突出顯示的文本的文本顏色。更改突出顯示的文本顏色
世界
的顏色由黑色變爲白色。我怎樣才能做到這一點?
我嘗試添加ColorStateList作爲drawable,但它沒有幫助。 我的TextView:
<TextView
android:id="@+id/tv_hello"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
android:textColorHighlight="@color/light_blue"
android:textIsSelectable="true"/>
這給所選文本bg。我已經添加了這個。我想改變突出顯示的文本的'textColor'。 –
我已經嘗試過,但不幸的是,這也無法正常工作。 –