본문 바로가기

전체 글109

Lint로 코드 개선하기 Improve Your Code with Lint (11) Lint로 코드 개선하기 Improve Your Code with LintIn This DocumentOverviewRunning lint from Android StudioRunning lint from the command-lineConfiguring lintConfiguring Lint in Android StudioConfiguring the lint fileConfiguring lint checking in Java and XML source filesSee AlsoUsing Android Annotations안드로이드 애플리케이션이 기능 요구사항을 충족시키는지에 대한 테스팅에 추가하여, 코드가 구조적으로 문제가 없도록 하는 것이 중요합니다.잘못 구조화된 코드는 안드로이드 app의 안정성과 효율.. 2016. 6. 2.
android:id, android:layout_width, android:layout_height (2) android:id android:id는 어떤 View를 유일하게 식별해주는 값으로, xml 안에 해당 id값을 문자열로 설정하면 애플리케이션이 컴파일될 때 정수로써 레퍼런스됩니다. xml 태그에서 id값 설정 android:id="@+id/my_btn" @: XML 구문분석기가 문자열을 분석하여 해당 문자열이 ID 리소스로써 사용되어야 한다는 것을 지시합니다.+: (R.java 파일에) 새로운 리소스 이름을 추가하는 기능을 합니다. cf) id문자열에 '+'가 없는 경우는 이미 선언된 id값을 사용하겠다는 의미로, android:id="@id/test"에는 test라는 id가 미리 선언되어 있어서, 선언된 id인 test를 사용한다는 의미입니다. android:layout_width, android:l.. 2016. 6. 1.
기본 개념, 기본 파일, 기본 용어 (1) 안드로이드는 아래와 같은 주요 구성 요소를 갖고 있습니다. ActivityService: 백그라운드에서 실행되는 컴포넌트로 시각적인 사용자 인터페이스(UI)를 갖고 있지 않음Broadcast Receiver: 언어 설정 변경 등 특정 브로드캐스트를 수신하거나 반응하는 컴포넌트. 시각적 UI를 갖고 있지 않음컨텐트 제공자(Content Provider): 애플리케이션 간 데이터 공유를 위해 표준화된 인터페이스를 제공하는 컴포넌트Intent: 컴포넌트에 액션, 데이터 등을 전달하는 메시지 컴포넌트Intent Filter: 수신할 수 있는 인텐트를 정의하여 컴포넌트를 정의하는 역할을 하는 컴포넌트 activity_main.xml 메인 액티비티의 레이아웃 파일 메인 액티비티의 레이아웃을 구성 MainActivi.. 2016. 6. 1.
app 만들기 Write Your App (10) app 만들기 Write Your App안드로이드 스튜디오에는 개발의 각 단계마다 도구가 포함되어 있지만, 가장 중요한 것은 간단하게 app을 만드는 것입니다: 코드 작성하기, 레이아웃 작성하기, 이미지 만들기, 생산적으로 만들기. Android Studio includes tools for every stage of development, but what's most important is simply writing your app: writing the code, building layouts, creating images, and being productive along the way.그것이 이 섹션에서 다루는 모든 것입니다: app 만들고 app을 신속하게 만드는 것을 도와주는 도구들. That'.. 2016. 6. 1.
Add Code from a Template (9) Add Code from a TemplateIn this documentApplication TemplatesBlankActivity TemplateFull Screen Activity TemplateMaster Detail Flow TemplateActivity TemplatesLogin Activity TemplateSettings Activity TemplateOther TemplatesAndroid Studio provides code templates that help you create new projects with a certain design pattern or to add components to your existing project. The code templates follow t.. 2016. 6. 1.
안드로이드 라이브러리 만들기 Create an Android Library (8) Create an Android LibraryIn this documentCreate a Library ModuleAdd Your Library as a DependencyDevelopment ConsiderationsAndroid library는 구조적으로 Android app module과 같습니다. 안드로이드 라이브러리에는 source code, resource files, Android manifest 등 app을 만드는데 필요한 모든 것이 포함될 수 있습니다. 하지만 장치에서 가동되는 APK로 컴파일 하는 대신, Android library는 안드로이드 app모듈의 dependency로 사용되는 Android Archive (AAR) 파일로 컴파일됩니다. An Android library is .. 2016. 6. 1.