Android app will not fill the screen on Tablet

I’m just starting my first Android app, which allows users to draw to the screen. So accomplish this, I’m not using a normal xml layout file which is then “rehydrated”, but instead I’ve just created a class which inherits from View which deals with drawing the user input to the screen. I fired up a new project in IntelliJ IDEA and created my view and the classes which would run the app based on the html5 canvas/javascript prototype I’d put together a little while earlier. Everything worked well except the application only filled about a quarter of the screen when run on my Xoom tablet, despite me not actually having specified any screen sizes or limitations.

The solution, after some googling, was fairly simple- in the manifest you need to specify the minSdkVersion to be at least 4, as prior to this, varying screen sizes was not supported. I added the following to the bottom of my manifest file;

<uses-sdk android:minSdkVersion=”4″ />

  1. #1 by Curly on June 22, 2011 - 22:56

    Cheers – first hit off Google and that’s exactly what I was after.

    Thanks for blogging it. :-)

  2. #2 by Q on July 9, 2011 - 05:22

    THANK YOU! You have NO idea how many hours I wasted trying to find any help on this. To my absolute astonishment there is no just straight forward ground up example for a starter android app that supports the large tablet screens. Plenty of suggestions for xml layout and such but for some reason it seemed to either escape everyone – or just me – to mention that you must specify the target SDK to be 4. Wow man! I was beginning to reconsider my profession.

  3. #3 by shawson on July 9, 2011 - 16:21

    lol no worries- it had me stumped for a while!

(will not be published)