• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Layout-sw600dp

 
Greenhorn
Posts: 9
Android
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there!

I am racking my brain, but I don't get it. I want to use a special layout for tablets to get the images of my app bigger. Right now both my phone and tablet are mdpi and therefore the sizes of the images the same. Which looks ridiculous on a 600x1024 tablet. But somehow I don't get the images shown bigger.

When the code as you can see below is not wrap content, but match parent the images are so big that the two lines of information (name plus size of the image/art work) that go with it falls of the screen. Therefore I tried wrap content combined with the minimal width, but the images are still there original size.

Any suggestions? Thank, Fleur

 
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You probably need to scale the image dynamically with maintaining the aspect ratio.
 
Fleurtje Eliza
Greenhorn
Posts: 9
Android
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply, Swastik. But I am not sure I understand it... do you mean I should fix this not in the xml file? Please, could you be more specific to get me going?

Thank you, Fleur
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Fleurtje Eliza
Greenhorn
Posts: 9
Android
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wow Swastik, thanks so much for this example!! I was afraid that indeed it wouldn't be just a simple xml sw600dp file... Now I know where to start.

Ciao, Fleur

PS - I need some time to study this, because this needs to go with my viewpager activity. So mods, please don't close this topic yet.
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are welcome.
 
Why fit in when you were born to stand out? - Seuss. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic