is there a way to detect device width so that we can add views programmatically based on device screen width. For example, single or dual pane.
Right now, the way for adpative UI is using layout XML for different device size. This is not flexible enough in our case.
layout-small/
layout-large/
layout-sw600dp/
The preferred way for us is: layout.xml defines the root empty container only, and add views programmatically based on device size that is detected at runtime.
Thanks.
U can use this code to get runtime Device's display Width & Height
U can set like