[英]TO set background to a tabview in android
您能告訴我如何在android中設置tabview的背景嗎?
在文件夾值中,輸入:
<resources>
<color name="green">#ff00ff00</color>
</resources>
在colors.xml文件中。
在您的Java代碼中:
tb.setBackgroundResource(R.color.green); //where tb is your tabview
如果要在xml中嘗試,請嘗試:
android:background="@color/green"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.