[Q] layout XML, fill_parent, app-specific screen-size spoofing
I have a Galaxy Tab 2 10.1 with a 1280x800 display and recently enabled floating multi-window capabilities using this mod: http://forum.xda-developers.com/show....php?t=2449094
Now that I can have floating windows, I wanted to try and edit some games I play to not take up the whole screen and make them think I'm running on a phone with a small screen size (which I know they can, since I've played the same exact APK on a smaller screen size).
So what do I do? I download apktool, decompile the APK, and check the res/layout XML files. In this particular app's case, there are 3 XML files, and all the views are defined at layout_width and layout_height of fill_parent. I change them to something silly like 400px and 640px (to, say, run 4 of these in landscape mode on my screen).
Of course this doesn't work. Some parts are actually 400/640, but some draw at full screen size. My guess is that there are some parts that are drawn pragmatically that bypass the layout settings set in the XMLs and use calls like GetDeviceScreenSize() for dimensions or whatever. I can't find any other layout rules in the XML so I assume this is embedded in the smali files somewhere (pardon my android development nubbery here).
Now that you know the background, my question is: is there a way I can fool a particular app into thinking that my screen is smaller? I know I can change the entire devices DPI but that won't help me. I want to do this on an app-specific basis, sandbox style. Have I missed something simple other than red/layout that I can change to get this app to behave like I want it to?
If the answer to these questions is no, will I be able to achieve my goal by digging into the smali files? If so, would anyone care to share some advice?
Thanks in advance!