how to use material design features in api lower than 21 in eclipse?

前端 未结 2 1327
滥情空心
滥情空心 2020-12-18 11:42

there are many questions regarding this but not even single helped me.

So please tell me how to enable material design features in eclipse.

i have also impo

相关标签:
2条回答
  • 2020-12-18 12:30

    There are some points you should check:

    • Import into eclipse, last version of android-support-v7-appcompat project. You should update via SDK Manager, and import project from {your_path_to_android_sdk}/extras/android/support/v7/appcompat
    • Add this project as library dependency to your project
    • In styles.xml use Theme.AppCompat.Light or Theme.AppCompat:

      style name="AppTheme" parent="@style/Theme.AppCompat.Light"

    0 讨论(0)
  • 2020-12-18 12:34

    A simple guideline:

    • import the appcompat-v7 project and add it as a library dependency for your project
    • let your theme inherit some of the appcompat themes. For example <style name="Theme.MyTheme" parent="Theme.AppCompat.Light">
    • Note that not all widgets (ui elements) are material-styled by appcompat
    • Follow the examples and explanations in the android-developers blogspot.
    • The values-vXY folders are used to add specific resources for a specific platform. For example you might add a style (in a values-v21 folder) that inherits some of the material styles that are built-in and available only one api level 21+. These folders are created manually and are only used if you want an alternative resource for a specific platform level. They are used when you want your app to fit better in all/many android versions. More info - at the android developers portal
    0 讨论(0)
提交回复
热议问题