我正在研究android應用程序的操作欄。我想actionLayout
爲用給定樣式創建TextView
我讀的地方做最簡單的方法是讓TextView
與特定風格的行動項目。 我知道如何將TextView
與item
的actionLayout
屬性整合在menu
xml文件中。
我正在尋找的唯一的事情就是具體的風格。我已經嘗試了很多android:style
。無幫助
底部陰影出現在圖像沒有操作按鈕部分
我正在研究android應用程序的操作欄。我想actionLayout
爲用給定樣式創建TextView
我讀的地方做最簡單的方法是讓TextView
與特定風格的行動項目。 我知道如何將TextView
與item
的actionLayout
屬性整合在menu
xml文件中。
我正在尋找的唯一的事情就是具體的風格。我已經嘗試了很多android:style
。無幫助
底部陰影出現在圖像沒有操作按鈕部分
試試這個代碼在XML文件中:
<TextView android:id="@+id/textview" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:background="@drawable/yourimage" android:text="@string/home" android:textAppearance="?android:attr/textAppearanceSmall" />
做到這一點在你的代碼氮肥利用9 .pach繪製文件
什麼是9 pach可繪製文件 – user2653926
這是讓你的圖像澱粉能搜索谷歌如何使9pach文件 –
請使用自定義佈局,並在actionLayout –
搜索自定義佈局如何創建谷歌的自定義佈局 – user2653926
搜索,你會發現代碼它 –