Android 如何进行棒棒糖前设备的材料设计
我希望有相同的设计,为前棒棒糖设备 在我的应用程序中,我在棒棒糖设备上使用的开关按钮如下所示: 在棒棒糖前的设备上。看起来是这样的: 那么,我如何才能做到这一点呢?我有两个样式文件夹: 我的xml样式如下所示:Android 如何进行棒棒糖前设备的材料设计,android,android-5.0-lollipop,android-design-library,Android,Android 5.0 Lollipop,Android Design Library,我希望有相同的设计,为前棒棒糖设备 在我的应用程序中,我在棒棒糖设备上使用的开关按钮如下所示: 在棒棒糖前的设备上。看起来是这样的: 那么,我如何才能做到这一点呢?我有两个样式文件夹: 我的xml样式如下所示: <resources> <style name="MyMaterialTheme" parent="MyMaterialTheme.Base"> </style> <style name="MyMaterialTheme.Base"
<resources>
<style name="MyMaterialTheme" parent="MyMaterialTheme.Base">
</style>
<style name="MyMaterialTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="windowActionModeOverlay">true</item>
<item name="actionModeBackground">@color/colorPrimaryDark</item>
</style>
<style name="MyMaterialTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="MyMaterialTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
真的
假的
@颜色/原色
@颜色/原色暗
@颜色/颜色重音
真的
@颜色/原色暗
您可以使用类而不是
开关来提供向后兼容性 您可以使用类而不是开关来提供向后兼容性 对于交换机,您需要使用新的android.support.v7.widget.SwitchCompat
有关交换机的更多信息,您需要使用新的android.support.v7.widget.SwitchCompat
更多信息