How can I detect which layout is selected by Android in my application?

前端 未结 8 1982
孤街浪徒
孤街浪徒 2020-12-12 10:35

Assume I have an activity with three different layouts in different resource folders. For example:

layout-land/my_act.xml
lay

8条回答
  •  无人及你
    2020-12-12 11:17

    I dont know the exact way to find it. But we can find it in different way.

    Add one textview in all the layouts.(visibility hidden). Assign values like xlarge, land, xlarge-land accordingly.

    In program, get the value from textview. Somehow we can get to know like this.

提交回复
热议问题