zoukankan      html  css  js  c++  java
  • Head Fisrt Android Development读书笔记(4)Multiple Device Support

    in apk webserver

    add the mime type application/vnd.android.package-archive fro the .apk extension

     

    portrait mode \ landscape mode intellij

    android2.3.3 :

    portrait:

    landscape:

    android 4.1 landscape:


    (如果有人知道为什么不同的android版本在landscape上显示会不同的原因,请留言,谢谢)


    landscape: res/layout-land/main.xml

    small: res/layout-small.main.xml


    Two properties that effect the way your application looks:

    Screen size: the number of horizontal and vertical pixels on a screen.

    Pixel Density:the abstracted number of pixels in an inch square.

    different images for different pixel densities

    hdpi: high pixel density (around 240 DPI)

    mdpi: medium (around 160 DPI)

    ldpi: low (around 120 DPI)

     

    Real size is the whole reason for the pixel density groupings.

    for 240 pixel width icon, will displayed for 1 inch in 240 pixel and 2 inch for 120 pixel

     

    pixel demensions for launcher icons at each pixel density.

    low: 36*36

    medium: 48*48

    high: 72*72


    Set icon:

    res/drawable-hdpi/icon.png

     <application android:label="@string/app_name" android:icon="@drawable/icon">

  • 相关阅读:
    2
    1
    java10
    java8
    java9
    java7
    java6
    java5
    java4
    java3
  • 原文地址:https://www.cnblogs.com/java20130722/p/3206869.html
Copyright © 2011-2022 走看看