android


how can i get my android app to properly display on a touchpad?


i created a game and released it, but really only tested it on phones and the emulator. later on i downloaded it on a touchpad and it confined to a small box at the top. through some searching i found that adding this code to my manifest:
android:resizeable="true"
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:anyDensity="false" />
i got it to fill up the whole screen, but everything is now horrendously out of proportion. is there a better way of going about this? do i need a separate layout xml for phones and touchpads? do i need to rewrite my original xml from the ground up?
Read this article:
http://developer.android.com/guide/practices/screens_support.html
By following the practices described in this document, you can create
an application that displays properly and provides an optimized user
experience on all supported screen configurations, using a single .apk
file.
...
Your application achieves "density independence" when it preserves
the physical size (from the user's point of view) of user interface
elements when displayed on screens with different densities.
Maintaining density independence is important because, without it, a
UI element (such as a button) appears physically larger on a low density
screen and smaller on a high density screen. Such density-related size
changes can cause problems in your application layout and usability.
...
The Android system helps your application achieve density independence
in two ways:
The system scales dp units as appropriate for the current screen density
The system scales drawable resources to the appropriate size, based on
the current screen density, if necessary
I think it is better to design your layout for every screen size and resolutions. It is easy in android. Copy your layout from "layout" folder of resources and paste it in the "layout-land", "layout-xlarge", "layout-xlarge-land" and ... folders and change those settings you need in them.
you can check this link:

Related Links

What mechanism to use with YouTube access in Android.
Notify user when the call is answered by other party
invalid character error when building a library with the Android NDK
requestNewPublishPermissions for Facebook SDK in Android
List view activity showing objects only the first time it is opened
Drawing polygon and change the color
USB driver for android
Why the client sends the message to the socket server only once?
How to find whether app is running in background or foreground or killed android
Android Fragment Back Button overlays other fragment and keeps active
How display thumbnail of video the same view of camera?
Android.view.InflateException: Binary XML file line #6 error inflating class
Resource id cannot be an empty string (at 'text' with value '?') in textAppearance attribute
popup layout not centered in Gingerbread device
Get list view item info through context menu
Android 9-patch scaling affected by the density folder that it resides in

Categories

HOME
django
delphi-7
checkstyle
c++11
themes
spring-data-redis
sublimetext
parameters
visual-studio-emulator
spring-session
jax-ws
frontend
odoo-8
lanczos
mql5
ibeacon-android
enthought
scrolltop
android-intent
event-sourcing
firefox-addon
dimensional-modeling
mapstruct
gmm
windows-xp
blade
string-concatenation
corpus
wcag
failover
winpe
send
mockjax
kodi
playstation-portable
erb
spring-security4
android-maps-extensions
gnat-gps
openerp-7
alphabetical
playframework-2.1
connection-pool
signals-slots
kill
preloader
lpsolve
knime
file-sharing
monkey-testing
procfile
double-click
linter
cnc
user-defined-fields
scalding
colorbar
avx
bbpress
reshape
mouseleave
rackspace-cloud
flyout
vibrate
pocketsphinx-android
donations
stripe-connect
pure-css
pacemaker
nikeplus-api
jodd
android-dateutils
respondcms
realsense
exim4
blitline
asyncdisplaykit
sapi
linklabel
sciruby
rate-limiting
sql-server-data-tools
telepat
node-serialport
broadband
mmwormhole
delayed-execution
paw
jama
reflector
android-framework
dsym
drupal-nodes
git-repo
jeromq
inappsettingskit
merb
actiondispatch
preload
wimax
intersect
faye
cuda-gdb
infobright
multiplatform
umra
commerceserver2007
office-2007
zen
scrollbars
cldc
asynchronous-wcf-call
flvplayback
cardspace

Resources

Encrypt Message