Android/App개발2012. 7. 16. 17:38


출처 : http://iyeti.kr/630

안드로이드를 개발하면서 아이폰과는 달리 가장 짜증났던부분이 해상도에 관련된 문제 일듯합니다.
안드로이드 펍에서 회색님이 기본적인걸 정리해 주셨네요. 


=============== 스마트폰 =================

[HVGA 스마트폰]

- RESOLUTION : 320px(320dp), 480px(480dp)

- DENSITY DPI  : mdpi, 160 dpi

- SCREEN SIZE : normal


예 : G1, 옵티머스원


[WVGA 스마트폰] 

- RESOLUTION : 480px(320dp), 800px(533dp) or 854px(569dp)

- DENSITY DPI  : hdpi, 240 dpi

- SCREEN SIZE : normal


예 : WVGA800 : 넥서스원, 갤럭시S, 갤럭시S2 WVGA854 : 모토로라 드로이드, XPERIA X10


=============== 태블릿 =================

[7인치 태블릿]

- RESOLUTION : 600px(600dp), 1024px(1024dp)
- DENSITY DPI  : mdpi, 160 dpi

- SCREEN SIZE : large


예 : 킨들 파이이, 누크 태블릿


[10인치 태블릿]

- RESOLUTION : 1280px(1280dp), 800px(800dp) or 720px(720dp)
- DENSITY DPI  : mdpi, 160 dpi

- SCREEN SIZE : xlarge


예 : 갤럭시탭 10.1, 모토로라 XOOM


=============== 태블릿폰 =================

[갤럭시노트]

- RESOLUTION : 800px(400dp), 1280px(640dp)

- DENSITY DPI  : xhdpi, 320 dpi

- SCREEN SIZE : ??? (Gingerbread)


[7인치 갤럭시탭(2010)]

- RESOLUTION : 600px(400dp), 1024px(682dp)

- DENSITY DPI  : hdpi, 240 dpi

- SCREEN SIZE : large(Gingerbread)



크게 4가지로 나눠지네요. 

1. 320dp 스마트폰 

2. 400dp 태블릿폰 (2011 현재 삼성에서만 출시, 갤탭(2010)은 7인치지만 dp 분류상 갤노트와 같이 분류.)

3. 600dp 7인치 태블릿

4. 720dp(800dp) 10인치 태블릿. 


* 참고 * 

http://developer.android.com/guide/practices/screens_support.html

http://android-developers.blogspot.com/2011/07/new-tools-for-managing-screen-sizes.html


* 주의사항 *

- 킨들파이어(2011) : 스크린 사이즈가 실제 디바이스에서는 Large인데 에뮬레이터에서는 XLarge로 잡힐 수 있습니다. 안드로이드 3.0 이하에서는 스크린 사이즈 잡는 부분이 문서와 같이 동작하지 않습니다. 


- 갤럭시탭(2010) : 400dp라는 흔치 않은 넓이를 가지고 있으며 문서와 다르게 Normal이 아니라 Large로 잡습니다. 문서대로라면 ICS로 업그레이드시에 달라질수 있을것으로 보이니 유의해야할것 같습니다.



실제기기에서 확인해보지 않은 값도 있습니다. 잘못된 부분 있으면 알려주세요. 확실치 않은 부분은 ? 붙여놓을테니 확인 부탁드립니다.


위키에 좀더 자세한 해상도 정보가 있습니다. :  http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density 

[출처 : 
 http://www.androidpub.com/index.php?mid=android_dev_info&document_srl=1895935]


#.2012.04.19 내용추가
갤럭시넥서스: layout-sw360dp
갤럭시노트: layout-xhdpi-1280x800 (or layout-normal-xhdpi)
갤럭시탭10.1: layout-xlarge-mdpi(3.2이상 버전에서는 layout-sw800dp로도 가능)
HD(1280x720)폰: layout-xhdpi-1280x720 (layout-normal-xhdpi)
HTC Evo4g: layout-hdpi-960x540


Posted by 삼스
카테고리 없음2012. 7. 11. 17:50


GUIDE TO BUILDING OGRE

========================================================================


Ogre uses CMake as its build system on all supported platforms. This

guide will explain to you how to use CMake to build Ogre from source.



1. What is CMake?

-------------------


CMake is a cross-platform build system - or perhaps more accurately a

build configurator. It is a program which, from a set of CMake scripts,

creates a native build system for your platform that allows you to 

build Ogre. 

The build process is configurable via CMake. Ogre provides several

options which you can use to customise your build. 



2. Getting CMake

------------------


CMake is available from http://www.cmake.org (Resources -> Downloads).

You can get its sources, but there are precompiled binaries for all

platforms. Furthermore, if you are on a Linux system, chances are high

that your distributor offers a package for CMake. You need a CMake

version >= 2.6.

For Ubuntu, type the following in a console to install CMake:

> sudo apt-get install cmake-gui



3. Getting dependencies

-------------------------


Ogre requires the freetype library, but there are other dependencies we 

strongly recommend you to use unless you know what you are doing. You

can get source or binary packages for each from their respective websites

listed below. We also offer precompiled dependencies or bundled source

packages for certain platforms, please refer to our download page:

  http://www.ogre3d.org/download/source

Linux distributions usually offer packages for each dependency. On Ubuntu

Karmic, the following command will install all of the dependencies:

> sudo apt-get install libfreetype6-dev libboost-date-time-dev \

>   libboost-thread-dev nvidia-cg-toolkit libfreeimage-dev \

>   zlib1g-dev libzzip-dev libois-dev libcppunit-dev doxygen \

>   libxt-dev libxaw7-dev libxxf86vm-dev libxrandr-dev libglu-dev

If you cannot obtain prebuilt binaries of a dependency for your platform,

please refer to the list below and get a source package from the website,

then build it according to its documentation.


Required dependencies:

* freetype: http://www.freetype.org


Recommended dependencies:

* Boost: http://www.boost.org (+)

* Cg: http://developer.nvidia.com/object/cg_toolkit.html

* DirectX SDK: http://msdn.microsoft.com/en-us/directx/

* FreeImage: http://freeimage.sourceforge.net

* zlib: http://www.zlib.net

* zziplib: http://zziplib.sourceforge.net


Optional dependencies:

* CppUnit: http://cppunit.sourceforge.net

* Doxygen: http://doxygen.org

* OIS: http://sourceforge.net/projects/wgois

* POCO: http://pocoproject.org (+)

* TBB: http://www.threadingbuildingblocks.org (+)


(+) Boost is used to build threaded versions of Ogre. Only the 

boost-thread and boost-date-time libraries are required. For Visual C++

you can find binary installers at http://www.boostpro.com.

Alternatively, you can use either POCO or TBB instead of Boost to

enable thread support in Ogre.



4. Preparing the build environment

------------------------------------


You should now create a build directory for Ogre somewhere outside

Ogre's sources. This is the directory where CMake will create the

build system for your chosen platform and compiler, and this is also

where the Ogre libraries will be compiled. This way, the Ogre source

dir stays clean, and you can have multiple build directories all

working from the same Ogre source.

If you are on Windows, you should now gather all the compiled

dependencies in a common directory called 'Dependencies'. Inside

this directory you should have the subdirectories bin, lib and include

where you place .dll, .lib and header files of the dependencies,

respectively. (If you are using one of our precompiled binary packages,

then this layout will already have been created for you.)

This 'Dependencies' dir can then be placed either inside the Ogre 

source directory or inside your chosen build directory. You can also 

put it somewhere else, but you will then need to tell CMake the location

as described below.



5. Running CMake

------------------


Now start the program cmake-gui by either typing the name in a console

or selecting it from the start menu. In the field 'Where is the source

code' enter the path to the Ogre source directory (the directory which

contains this file). In the field 'Where to build the binaries' enter

the path to the build directory you created in step 4.

Hit 'Configure'. A dialog will appear asking you to select a generator.

Choose the appropriate one for your platform and compiler. On Unix, you

most likely want to use 'Unix Makefiles'; for Visual Studio select the

appropriate version and platform (Win32 | Win64); on Apple use Xcode.

Click 'Finish'. CMake will now gather some information about your

build environment and try to locate the dependencies (+). It will then show

a list of build options. You can adjust the settings to your liking; for

example unchecking any of the OGRE_BUILD_XXX options will disable that

particular component from being built. Once you are satisfied, hit

'Configure' again and then click on 'Generate'. CMake will then create

the build system for you.


(+) If you receive errors about dependencies not being found, even though

you have successfully installed or compiled them in step 3, then you may

need to tell CMake where to look. On Unix platforms CMake should usually

be able to pick up all the dependencies if they are installed in standard

locations. If you followed the advice of step 4 and put all dependencies 

in a common directory, then you can specify that directory in the

variable OGRE_DEPENDENCIES_DIR. Otherwise, you can specify the directory

for each dependency individually. Click on 'Add entry' to add a new CMake

variable, then select 'PATH' as the type. The name of the variable is

XXX_HOME, where XXX is to be replaced by the dependency package, e. g.

ZLIB_HOME, ZZIP_HOME or FREETYPE_HOME. For the value, specify the directory

where the dependency can be found and click Ok. Once you are done, hit

'Configure' again.



6. Building Ogre

------------------


Go to your chosen build directory. CMake has generated a build system for

you which you will now use to build Ogre. If you are using Visual Studio,

you should find the file OGRE.sln. Open it and compile the target

'BUILD_ALL'. Similarly you will find an Xcode project to build Ogre

on MacOS. If you are using a Makefile generator, then instead open a

console and cd to your build directory, then call the appropriate make

program. E. g. on Linux type

> make

to start the build process. 

If you have doxygen installed and CMake picked it up, then there will

be an additional build target called doc which you can optionally build.

This will freshly generate the API documentation for Ogre's classes from

the header files. In Visual Studio, just select and build the target

'DOC', on Linux type:

> make doc



7. Installing Ogre

--------------------


Once the build is complete, you can optionally have the build system

copy the built libraries and headers to a clean location. This location

will strongly resemble the layout of our prebuilt Ogre SDKs. We recommend

you do this step as it will make it easier to use Ogre in your projects.

In Visual Studio, just select and build the target 'INSTALL'. This will

create the folder 'sdk' inside your build directory and copy all the 

required libraries there. For Makefile based generators, type:

> make install  (or sudo make install, if root privileges are required)

On Linux Ogre will by default be installed to /usr/local. You can change

the install location by changing the variable CMAKE_INSTALL_PREFIX in

CMake.



8. Building Ogre on Mac OS X for iOS OS

--------------------------------------------


To build Ogre for the iOS, you need to check the option

OGRE_BUILD_PLATFORM_APPLE_IOS in cmake-gui before you generate the Xcode

project. Unfortunately, you will now have to do a few manual steps to

make the generated build system work properly.


A Xcode project has now been generated in the build directory, so

to start the Ogre build, open OGRE.xcodeproj and build as usual.

To run samples on your device you will need to have a valid iOS Developer

certificate installed.  For each sample, double click on target in the Groups &

Files list.  Ensure that a valid identity is selected in the Code Signing Identity

drop menu.

Also, because we can't tell CMake what Xcode project format you want, you will 

have to change it yourself.  Open the Project Menu, choose Edit Project Settings.

Click on the General tab in the settings window.  Change Project Format to

Xcode 3.1-compatible.

And another thing.  You will need to manually set the Bundle Identifier property of

the Info.plist file to match the App ID of the chosen code signing identity.

This can be done from the Target Properties panel.  It must match the bundle

identifier of a valid developer certificate if you are building for devices.

See the following PDF for information under Generating an App ID:

http://developer.apple.com/library/ios/documentation/Xcode/Conceptual/iphone_development/index.html


Posted by 삼스
iOS2012. 7. 10. 14:19


디바이스별 화면구성요소 치수들에 대해 잘 정리된게 있어서 퍼왔숑~!

출처 : http://firejune.com/1723


iOS 기기용 웹앱이나 네이티브앱 개발시 유용하게 사용될 수 있는 치수들입니다. 특히, 모든 iOS 기기를 지원하는(유니버셜) 앱을 개발할 때 자주 찾게 되는 자료중 하나입니다. 스테이터스 바, 네비게이션 바, 탭 바,키보드 등의 사이즈를 세웠을 때와 눕혔을 때로 구분하여 측정했습니다.

아이폰의 화면 치수

아이폰에서 해상도를 계산할 때 굳이 레티나 디스플레이의 해상도(640 x 960)를 의식하여 계산할 필요는 없습니다. 단순히 이미지가 사용되는 곳에 더블픽셀(@x2)의 고해상도 이미지를 한 셋트 더 준비하면 된다는 사실만 기억하세요.

Portrait - 세웠을 때

앱 시작시 나타나는 오프닝 이미지는 기본으로 320 x 367 픽셀의 "filename.png"로 설정하고 레티나용으로 표시될 이미지는 640 x 734 픽셀의 "filename@2x.png"로 설정하면 됩니다.

iphone_portrait_dimensions.jpg
iPhone Portrait Width: 320px
iPhone Portrait Height: 480px

Status Bar Height: 20px
Nav Bar Height: 44px
Main Content Area Height: 367px
Tab Bar Height: 49px

Keyboard Height: 216px

iphone_portrait_keyboard_sizes.jpg
키보드가 나타난 상황에서는 메인 스크린의 일부와 탭바를 가립니다. 키보드 크기를 제외한 나머지 영역의 크기를 계산할 때 참고하세요.

Landscape - 눕혔을 때

아이폰을 눕혔을 때 나타나는 변화는 메인 컨텐츠 영역의 높이가 480에서 219픽셀로 줄어드는 것이고 네비게이션 바의 높이가 44에서 32픽셀로 줄어든다는 것입니다. 오프닝 이미지는 기본으로 480 x 219 픽셀 그리고 레티나용(@2x)은 960 x 438 픽셀입니다. 참고로 아이폰의 앱 시작 이미지는 세로와 가로 모두 준비할 필요가 없습니다. 자신의 앱이 가로와 세로 중 어디에 최적화 되어있는지를 판단하여 한가지만 준비하면 됩니다.

iphone_landscape_dimensions.jpg
iPhone Landscape Width: 480px
iPhone Landscape Height: 320px

Status Bar Height: 20px
Nav Bar Height: 32px
Main Content Area Height: 219px
Tab Bar Height: 49px

Keyboard Height: 162px

iphone_landscape_keyboard_sizes.jpg

아이패드의 화면 치수

아이패드는 아직 레티나 디스플레이를 지원하지 않기 때문에 더블픽셀(@2x) 이미지를 준비할 필요가 없습니다.

Portrait - 세웠을 때

ipad_portrait_dimensions.jpg
iPad Portrait Width: 768px
iPad Portrait Height: 1024px

Status Bar Height: 20px
Nav Bar Height: 44px
Main Content Area Height: 911px
Tab Bar Height: 49px

Keyboard Height: 264px

ipad_portrait_keyboard_sizes.jpg

Landscape - 눕혔을 때

아이폰과 달리 아이패드는 화면을 눕혔을 때 네비게이션 바의 높이에는 변화가 없습니다.

ipad_landscape_dimensions.jpg
iPad Landscape Width: 1024px
iPad Landscape Height: 768px

Status Bar Height: 20px
Nav Bar Height: 44px
Main Content Area Height: 655px
Tab Bar Height: 49px

Keyboard Height: 352px

ipad_landscape_keyboard_sizes.jpg

Posted by 삼스