2017-04-09 59 views

回答

0

設置android:textCursorDrawable屬性@null應導致使用android:textColor作爲光標顏色。

,或者您可以使用樣式看起來像這樣

<style name="AppTheme.EditText" parent="@style/Widget.AppCompat.EditText"> 
    <item name="android:textColor">@color/white</item> 
    <item name="android:textColorHint">#8AFFFFFF</item> 
    <item name="android:background">@drawable/edit_text_background</item> // background (bottom line at this case) 
    <item name="android:textCursorDrawable">@color/white</item> // Cursor 
    <item name="android:textSelectHandle">@drawable/my_white_icon</item> // For pointer normal state and copy text state 
    <item name="android:textSelectHandleLeft">@drawable/my_white_icon</item> 
    <item name="android:textSelectHandleRight">@drawable/my_white_icon</item> 
</style> 

希望它能幫助

+0

謝謝您的回答,我設法用這個來代替:<項目名稱=「colorControlActivated」> @色/ colorPrimary inside styles.xml。這樣我就不需要改變圖標本身,謝謝你的回覆,現在我學會了如何改變圖標,如果我需要的話! :) – Blazko