Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Different layouts for different Android versions

Although it seems like stupid question, I'm wondering if there is another elegant way to handle my design problem rather than just to create two separate layouts My App is supposed to have different custom layouts for ongoing notifications for Marshmallow and Nougat versions. The straightforward way, as I said, is to create two different XML files and load them base on the runtime platform. Is there any another approaches?

like image 704
Denis Voloshin Avatar asked Aug 23 '17 12:08

Denis Voloshin


1 Answers

You are supposed to create different xml-Files for different versions, Android's Resource Management is designed like this. Check this link for more information https://developer.android.com/guide/topics/resources/providing-resources.html

like image 117
finki Avatar answered Sep 30 '22 15:09

finki