• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Reading Screen Size

I am just finishing up a Tasker project that uses 5 scenes. It will be used on large format phones and small format phones. Since Tasker has problems in resizing I created two sets for a total of 10 scenes.

The scenes are 512 wide and 1024 wide.

I load the names into a list and can choose which set of 5 to use for the current device.
540 x 960 use 512 version (Bionic)
720 x 1280 use 512 version (Maxx)
1440 x 2560 use 1024 version (Turbo)​

How can I tell the dimensions of the screen being used so I can make the choice?

(I uses these sizes so I could develop on the 1024 version and then reduce every dimension by 50% for the 512 version.)

... Thom
 
Turns out it was added to Tasker ... this gives the width from a width x height response ...

AAAA
A1: Test Display [ Type:Resolution Data: Store Result In:%work ]
A2: Variable Split [ Name:%work Splitter:x Delete Base:Off ]
A3: Popup [ Title: Text:%work1 Background Image: Layout:tlaPopup1024-0512 Timeout (Seconds):5 Show Over Keyguard:On ]

... thanks Pent.

... Thom
 
Back
Top Bottom