Am, This is essentially what I want to do, but with a more refined, reusable approach.
One thing that I've found is very helpful with the Android framework, is it has some built in failover type stuff. So if I have an hdpi asset, but no corresponding asset in the ldpi directory, it will just use the hdpi one. It would be interesting to scale down the asset in the generator using some of the better JavaFX tools as well. As of now, I'm investigating this approach. Thanks! E On Tuesday, April 17, 2012 5:49:25 AM UTC-4, Jens wrote: > > What about a custom property for deferred binding in a .gwt.xml file and a > small javascript that fills its value based on window.devicePixelRatio. > Older iOS devices have a ratio of 1 while the retina devices have a ratio > of 2 because each pixel is doubled. So you could define your own ratio > ranges and map them to property values like "ldpi", "mdpi", "hdpi". > > You could then create a Factory for your bundles and use deferred binding > to swap factories between devices based on their pixel density. I dont > think you can directly swap out ClientBundles as they are generated by GWT. > > > -- J. > > > Am Dienstag, 17. April 2012 11:21:41 UTC+2 schrieb Evan Ruff: >> >> Hey guys, >> >> So I'm designing an application to be used on tablets and phones. With >> the introduction of the new iPad, my images are getting BIG. Real big. >> HUGE. They're so big at this point, that it's really unwieldy to download >> the ginormous ImageBundle; further, when scaled down in the browser, the >> images aren't presentable anymore on smaller devices. >> >> I was wondering if anyone had started developing a >> resolution dependent ImageBundle, where I could define screen densities and >> have corresponding packages, much like the Android concepts. If not, I >> believe that this would be a useful extension to the framework as things >> like PhoneGap, MobileObjects and mgwt are really starting to push GWT >> successfully on to the mobile devices. Could someone who has some >> familiarity with the ImageBundle source point me in the direction of the >> Linker for that class? >> >> Thanks, >> >> E >> > On Tuesday, April 17, 2012 5:49:25 AM UTC-4, Jens wrote: > > What about a custom property for deferred binding in a .gwt.xml file and a > small javascript that fills its value based on window.devicePixelRatio. > Older iOS devices have a ratio of 1 while the retina devices have a ratio > of 2 because each pixel is doubled. So you could define your own ratio > ranges and map them to property values like "ldpi", "mdpi", "hdpi". > > You could then create a Factory for your bundles and use deferred binding > to swap factories between devices based on their pixel density. I dont > think you can directly swap out ClientBundles as they are generated by GWT. > > > -- J. > > > Am Dienstag, 17. April 2012 11:21:41 UTC+2 schrieb Evan Ruff: >> >> Hey guys, >> >> So I'm designing an application to be used on tablets and phones. With >> the introduction of the new iPad, my images are getting BIG. Real big. >> HUGE. They're so big at this point, that it's really unwieldy to download >> the ginormous ImageBundle; further, when scaled down in the browser, the >> images aren't presentable anymore on smaller devices. >> >> I was wondering if anyone had started developing a >> resolution dependent ImageBundle, where I could define screen densities and >> have corresponding packages, much like the Android concepts. If not, I >> believe that this would be a useful extension to the framework as things >> like PhoneGap, MobileObjects and mgwt are really starting to push GWT >> successfully on to the mobile devices. Could someone who has some >> familiarity with the ImageBundle source point me in the direction of the >> Linker for that class? >> >> Thanks, >> >> E >> > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/CHb1ZjFAOw4J. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
