I have an app and that's already been made for large devices i.e 10 inch tablets and kiosk. I made the same design for the mobile phones but that was not looking good ,so I thought to move the mobile device to material design and the rest of the devices (tablets & kiosk) would remain same.
I know how can I make different layouts for the different devices i.e normal , large and x-large but I am worried about the code. So basically followings are my confusions....
- What is a best way to Judge which device my app is running on in code so that I have to run some methods on the basis of that because my normal device is following material design and contains some widgets that are not present in the design of tablets and kiosk i.e RecyclerView (for some purpose)?
- I have searched a lot for this problem and came to a point that there are 2 ways of supporting multiple devices 1> make two separate apks , 2> Make one apk and check in code to differentiate the devices, but as i said above in point no#1 that i have material design in normal devices and that is completely changed design in terms of widgets and layouts , fragments and even navigation, so what would you suggest is the best way to handle this?
- If I make 1 apk and put a check in code , then I must say I have a ton of code , and resources and in either case (if the device is normal and large) some resources and classes will never gonna used and will make apk size larger so what is a best way to make a work around about this problem ?
I have also searched through stackOverflow and only came up with these two links that were close to my question but rest of the links are about different layouts not the code:
- Android app for phone and tablet: 1 or 2 apps?
- Creating different layout for android phone and tablet
I hope I am quiet clear in my question please answer my these question with some authentic reasons and links.