Android中的style相關屬性,androidstyle相關

來源:互聯網
上載者:User

Android中的style相關屬性,androidstyle相關

android中的style屬性值

Android平台定義的主題樣式:

android:theme="@android:style/Theme.Dialog" // 將一個Activity顯示為對話方塊模式
android:theme="@android:style/Theme.NoTitleBar" // 不顯示應用程式標題欄
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" // 不顯示應用程式標題欄,並全屏
android:theme="@android:style/Theme.Light" // 背景為白色
android:theme="@android:style/Theme.Light.NoTitleBar" // 白色背景並無標題列
android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen" // 白色背景,無標題列,全屏
android:theme="@android:style/Theme.Black" // 背景黑色
android:theme="@android:style/Theme.Black.NoTitleBar" // 黑色背景並無標題列
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" // 黑色背景,無標題列,全屏
android:theme="@android:style/Theme.Wallpaper" // 用系統案頭為應用程式背景
android:theme="@android:style/Theme.Wallpaper.NoTitleBar" // 用系統案頭為應用程式背景,且無標題列
android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen" // 用系統案頭為應用程式背景,無標題列,全屏
android:theme="@android:style/Translucent" // 半透明效果
android:theme="@android:style/Theme.Translucent.NoTitleBar" // 半透明並無標題列
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" // 半透明效果,無標題列,全屏


android中自訂佈景主題,在style下的item項中有對於自訂視窗name屬性都有什,及這些屬性的取值

<item name="android:textAppearance">?android:attr/textAppearance</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#FFFFFFFF</item>
<item name="android:textSize">16dp</item>
<item name="android:windowEnterAnimation">@*android:anim/grow_fade_in_from_bottom</item>
<item name="android:windowExitAnimation">@*android:anim/shrink_fade_out_from_bottom</item>
<item name="android:fontFamily">sans-serif-light</item>
<item name="android:textAllCaps">true</item>
這些是在4.1系統源碼下的UI裡面的Style.xml中的一些,支援 普通的屬性,資訊不全,要全部的那些我估摸著這裡容不下。 可以自訂屬性。
 
Android中style下面的item都有什?分別代表著什?最全面的答案,或文檔

這不會有全面的回答的,style裡面只是用來定義一個你需要的樣式,可以是按鈕的,textview的,imageview的,對每個而言,它們的樣式屬性item就會不一樣,比如:
<style name="AccountPage_LabelText" parent="@android:style/Widget.TextView">
<item name="android:textColor">@android:color/white</item>
<item name="android:layout_marginTop">5px</item>
<item name="android:layout_marginBottom">3px</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
</style>
這就是一個Textview
的樣式
<style name="ListViewStyle" parent="@android:style/Widget.Holo.ListView">
<item name="android:listSelector">@drawable/XXX</item>
<item name="android:background">@color/XXX</item>
<item name="android:divider">@drawable/XXX</item>
</style>這是一個listview的樣式,每個都是不一樣的
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.