Android Preference Screen Layout

前端 未结 1 1218
轻奢々
轻奢々 2021-02-08 09:47

I have the following preference screen in my app




        
相关标签:
1条回答
  • 2021-02-08 10:28

    You can to apply a theme to it in your manifest, for example

    <activity android:name=".Settings"
         android:theme="@style/YourStyle"/>
    

    and in your styles.xml (if you dont have one, create it in the values folder) you can modify whatever you need

    For example

    <?xml version="1.0" encoding="utf-8"?>
    <resources>
    <style name="YourStyle" parent="android:Theme.Light">
        <item name="android:listViewStyle">@style/Widget.ListView</item>
        <item name="android:windowNoTitle">true</item>
    </style>
    
    <style name="Widget" parent="android:Widget">
    </style>
    
    <style name="Widget.ListView">
        <item name="android:background">@color/white</item>
        <item name="android:divider">@color/gray_division</item>
        <item name="android:dividerHeight">2dip</item>       
    </style>
    </resources>
    

    I hope this helps

    0 讨论(0)
提交回复
热议问题