简体   繁体   中英

android tablet app compatibility

What,s the reason that my Android app when installed on a tablet occupies the same space that it does on a phone. What do I have to do to hav it stretched out to occupy the full area of the tablet screen?

This problem is well understood and easy to fix - it only occurs in applications set for compatibility to API level 3 or below. So the easiest solution is to go into the manifest and change the minimum API (unless this is an issue to you)

Android documents your problem as 'basically, the system displays the application in a small window that is roughly the size of the normal screen size'

The android docs suggest some other solutions

There are couple of things you need to consider to make your app work across different size of screens (For example using dp for size etc.,). Here is android supporting multiple screens tutorial .

This might appear unrelated at first but I recently had an awful time getting my android app appearing in the Google Play store for a Hudl 2 tablet.

It turned out I needed to add a couple of lines in my manifest in order to increase my apps compatibility with more devices. More about "uses-feature"

<!--  Features are required by default so set as false if you want them to be optional -->
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.telephony" android:required="false" />

This is a problem I have been having too. It really kinda irks me, but it's to be expected. Refer here: Android Docs: Supporting multiple screen sizes.

What's going on, is as hardware gets better, the screen sizes (and effective dpi) increases. This makes the screen of the new hardware be able to support more content on the screen, thus making everything you place on it appear smaller.

To get around this, you will need to provide larger images to stretch out the content. This is where nine patch comes in. It is extremely useful for making hugely different sizes of stuff for one simple (and small) base image. Android has a fantastic tutorial on nine patch here .

In addition to the normal nine patch, I recommend different layouts for different screen sizes. This is what eats me, but it really is a necessity. Look here for some help on that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM