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的樣式,每個都是不一樣的