Universal application in android (phone and tablet)

前端 未结 2 996
攒了一身酷
攒了一身酷 2020-12-28 09:59

I am developing an Universal application in android which should run on android phone and android tablet, I know the procedure to make an application for android phone but h

相关标签:
2条回答
  • 2020-12-28 10:19

    I don't know if you're still looking for another answer, but I made a tool that can scale your layouts to the four different density buckets out there. If you create your layouts for one base-line density bucket, this tool can scale your layouts onto a tablet size screen:

    http://onemanmobile.blogspot.com/2012/04/how-to-scale-your-android-layouts-to.html

    It should take everyone very little time to make their simple Android app into a universal app for small, normal, large and x-large devices.

    0 讨论(0)
  • 2020-12-28 10:36

    You should support the different screen layouts. Take a look over at the multiple screen page

    It gives you, amongst explanation how to save multiple versions of files for different resolutions, als this piece of code for the manifest:

    <manifest xmlns:android="http://schemas.android.com/apk/res/android">
        <supports-screens
            android:smallScreens="true"
            android:normalScreens="true"
            android:largeScreens="true"
            android:xlargeScreens="true"
            android:anyDensity="true" />
        ...
    </manifest>
    

    You can make different drawable directories etc, as explained in the link.

    0 讨论(0)
提交回复
热议问题