简体   繁体   中英

Different layouts based on screen sizes

I have a requirement - For one particular screen size (say 10 inches), there are two Fragment within an activity - Fragment A and Fragment B.

For all other screen sizes greater than 10 inches, Fragment A and Fragment B are combined as one Fragment(say Fragment C).

How we can achieve this in Android?

My suggestion is

  • First change dimensions of fragment A as per ssp and sdp
  • Then change dimensions of fragment B as per ssp and sdp

  • Now change screen division dimensions of fragment C as per ssp and sdp (To merge fragment A and fragement B)

Links to do this:

https://github.com/intuit/ssp

https://github.com/intuit/sdp

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM