我創建了一個自定義textview類。通過這個課程,我可以設置字體,設置文本的內部陰影,設置文本的陰影,設置文本的半徑和顏色。我想要在按鈕中的文本中使用文本視圖的這些特徵。我通過谷歌研究,但我一直沒能找到解決我的問題的解決方案。所以,如果有人對這個話題有任何想法,那麼你會有很大的幫助。按鈕中的自定義TextView
屬性,我在我的TextView定義是
xmlns:braindigit="http://schemas.android.com/apk/res/com.example.MyCustomTextView" //this is in the main layout
<com.example.MyCustomTextView
android:id="@+id/stateInfo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/you_are_not_logged_in"
android:textColor="#3191d2"
android:textSize="18sp"
android:textStyle="bold"
braindigit:innerShadowColor="#003456"
braindigit:innerShadowDy="1"
braindigit:innerShadowRadius="1"
braindigit:outerShadowColor="#ffffff"
braindigit:outerShadowDy="1"
braindigit:outerShadowRadius="1" />
的Theres與自定義textview.But沒有問題,我不知道我該如何使用這些定製textvalues我的按鈕。
發表一些代碼或者你到目前爲止試過的東西? –
我已將代碼發佈在我的編輯@Dipak Keshariya – Prativa
找到您的問題的解決方案太難,製作一張圖片並將此圖片設置爲按鈕背景。 –