할일
2010-05-01 12:14:21

B : Recommandation 찾기, Action Script ??, Excel, RRF

S : UI 스펙 정하고 그에 맞는 UI 프로그램 개발 완료

M : 선형대수 시험 준비

P : ..

▼ more
아이폰 개발 준비 시작~ MacOS깔기~!
2010-05-01 04:27:37

아이폰의 출시 때문에 Mac OS에 대한 인지도도 높아지고 있는 듯 하다. 나역시 아이폰 구입 이후 Mac OS를 들여다보는걸 보면 말이다.

Mac OSX 스노우 레오파드 운영체제를 맛보고 싶은데 메인OS가 윈도우라면 나처럼 VMWare에 설치해서 사용하는 것도 나쁘지 않은 것 같다.

아래는 VMWare 7.0 버전에 Mac OSX 스노우 레오파드(설범?) 버전을 설치한 것을 기록하였다. 보통 해킨토시로 배포된 이미지를 찾아서 엄청난 삽질을 통해 설치하려 하지만 아래와 같은 방식으로는 오리지날 이미지로 한방에 설치에 성공한다. 본인은 이미지를 구해서 설치에 성공까지 대략 4시간 정도 걸렸다.

설치를 위해서는 일단,

1. VMWare 7.0 버전을 PC에 설치한다. 다음 링크에서 필요한 설치 파일을 찾아볼 수 있다. http://www.vmware.com/download/

2. 맥OSX 10.6.x(snow leopard) 버전의 이미지가 필요하다. 토렌트를 통해서 다운 받을 수 있으며, 뒤에 확장자는 DMG인 것을 확인해야 한다. 가져온 이미지는 UltraISO 와 같은 프로그램으로 ISO 파일로 변환해준다.

3. 다음 링크에 있는 darwin10 압축파일을 받아서 C:\darwin10 폴더에 압축을 푼 뒤, 명령창에서 다음 명령어를 실행한다.

C:\darwin10\setup.cmd install

darwin10.a00

darwin10.alz

4. VMWare실행 후 가상머신을 생성한다. 가상머신의 스펙은 다음과 같이 설정했다.

운영체제 : FreeBSD 64

CPU & Core : 1개씩

Memory : 512M(많이 잡으면 느려지는 현상이 있다고 함)

HDD : 60G

Network : NAT 모드

CD 이미지 : iso로 변환한 오리지날 이미지 설정

5. 생성한 가상머신이 있는 폴더에 .vmx 파일을 편집기(메모장 or 워드패드)로 열어서 guestOS를 찾아서 다음과 같이 수정한다. VMWare가 가상머신을 Mac OSX로 인식하기 위한 작업이다.

guestOS="darwin10"

6. 가상머신을 구동시켜서 설치를 시작한다.

▼ more
내 사이트는 구글의 감시를 받고있다
2010-04-29 17:15:28

음.

좋다

▼ more
Getting started programming Android with Eclipse
2010-04-29 14:44:07

본 글은 전적으로 http://developer.android.com/index.html 의 내용을 기반으로 작성되었다.

Android 설치 방법 및 안드로이드 가상 장치 경로 문제 해결 법

- 이클립스 설치를 마친다. http://www.eclipse.org/downloads/ 에서 Eclipse IDE for Java Developers를 선택하여 최신 버전을 설치할 것은 권장한다. 2010 4월 29일 기준 최신 버전은 galileo이다.

1. http://developer.android.com/sdk/index.html 에서 SDK를 다운받는다.

=> 원하는 위치에 압축을 풀어둔다.(개발하는 동안 옮기지 않을 곳)

=> 해당 폴더의 tools 폴더를 path에 포함시켜 개발을 편하게 할 수 있도록 한다.

2. http://developer.android.com/sdk/installing.html 을 보고 설치를 한다.

=> http://developer.android.com/sdk/eclipse-adt.html 로 이동하여 Eclipse에 Android Development Tools 줄여서 ADT를 설치한다.

- 이클립스에서 Help > Install New Software를 클릭하여 Add 버튼을 클릭하고 해당 사이트에 갈색으로 되어있는 경로를 url에 넣고 이름은 adroid정도로 해둔다.

- 콤보박스에서 adroid를 선택하면 아래에 pending되다가 목록이 나오고 전부 next를 누르며 설치하고 중간에 보안 관련 질문이 나오면 ok혹은 continue를 누른다.

=> 한번 이클립스를 껏다가 켜면 위 도구모음에 안드로이드 로봇아래 화살표 모양이 보이는 것이있다.

해당 아이콘을 클릭하고 Available Packages를 클릭하고 나오는 모든 Packages를 설치한다.

Android 예제 프로그램(Hellow, World)

이 프로그램을 직접 코딩하고 Layout을 XML으로 설정함으로써 가장 기초적인 Android프로그램을 실행 할 뿐 아니라 전반적인 실행 프로세스를 익힐 수 있다.

Android XML 설정

the application title : the string is defined in the res/values/strings.xml file and referenced by your AndroidManifest.xml file

UI관련 XML : /res/layout 에 있다. 예를 들어 main.xml을 수정하면 코드내에서 UI를 수정하지 않고 helloworld라는 텍스트가 나오게 할 수 있다.

R.layout.main 같은 식으로 R이라는 class에 자동으로 포함된 정보인 main에 관한 정보로 해당 xml에 접근할 수 있다.

Android가 UI을 XML로도 변경하는 이유 : The "Hello, World" example you just completed uses what is called a "programmatic" UI layout. This means that you constructed and built your application's UI directly in source code. If you've done much UI programming, you're probably familiar with how brittle that approach can sometimes be: small changes in layout can result in big source-code headaches. It's also very easy to forget to properly connect Views together, which can result in errors in your layout and wasted time debugging your code.

(요약하자면 소스안에 ui변경이 있으면 하나 바꿀때 너무 많은 부분을 바꿔야 하고 문제가 이로인해 문제가 발생 할 수 있기 때문이다.)

example :

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:text="@string/hello"/>

속성값과 그 의미

xmlns:android - This is an XML namespace declaration that tells the Android tools that you are going to refer to common attributes defined in the Android namespace. The outermost tag in every Android layout file must have this attribute.

android:layout_width - This attribute defines how much of the available width on the screen this View should consume. In this case, it's the only View so you want it to take up the entire screen, which is what a value of "fill_parent" means.

android:layout_height - This is just like android:layout_width, except that it refers to available screen height.

android:text - This sets the text that the TextView should display. In this example, you use a string resource instead of a hard-coded string value. The hello string is defined in the res/values/strings.xml file. This is the recommended practice for inserting strings to your application, because it makes the localization of your application to other languages graceful, without need to hard-code changes to the layout file.

R.java 란?

정의 : 파일 안에 정의된 모든 자료에 접근하기 위한 index이다.

일반적으로 아래와 같은 모습이다.

package com.example.helloandroid;

public final class R {

public static final class attr {

}

public static final class drawable {

public static final int icon=0x7f020000;

}

public static final class layout {

public static final int main=0x7f030000;

}

public static final class string {

public static final int app_name=0x7f040001;

public static final int hello=0x7f040000;

}

}

디버그 하는 방법은 일반 eclipse와 같이 할 수 있다.

여기 까지 수행했다면

http://developer.android.com/resources/tutorials/views/index.html

에서 다음 단계로 넘어갈 준비가 끝난 것이다.

하지만 고급 프로그래머 혹은 개발자가 되기위해선

Android가 단순하게 그래픽을 뿌려주는 것으로 끝나는 OS가 아니므로

전반적인 구조와 작동원리를 알고 넘어가는 것이 중요하다.

도서를 보거나

http://developer.android.com/guide/basics/what-is-android.html

를 하루이틀이라도 정독하여 안드로이드 OS가 어떤 원리로 이뤄진 것인지 알고 넘어가는 좋다.

▼ more