Android Material Design on KitKat (and lower) devices

后端 未结 2 1695
感情败类
感情败类 2021-02-06 10:43

I\'m going to develop an android application in our school as a project.

I want to use the new Material Design by Google but i know its only available on Android-L Devi

2条回答
  •  北海茫月
    2021-02-06 11:18

    appcompat v21 supports the toolbar on pre-lollipop devices as well.

    You can check out Chris's blog for some help on this https://chris.banes.me/2014/10/17/appcompat-v21/

    Of course, the elevation attributes does not work on pre-lollipop devices, so you need to implement custom shadow for version < 21. I would suggest a gradient drawable with height around 4dp works fine.

提交回复
热议问题