본문 바로가기
User Guide

app 만들기 Write Your App (10)

by 각종 잡상식 지식 모음 2016. 6. 1.
반응형

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's what this section is all about: the tools that help you write your app and write it quickly.

코딩 생산성 Coding Productivity


아래는 코딩할 때 보다 생산적이 되도록 도와주는 몇 가지 기능입니다.
The following are just a few features to help you be more productive when coding.

사용자작성 코드-완성 템플릿 만들기  Create custom code-completion templates

라이브 템플릿으로 작은 덩어리의 코드의 빠른 삽입과 완료를 위한 코드 스니펫을 입력할 수 있습니다.
라이브 템플릿을 삽입하려면, 템플릿 약어를 입력하고 Tab 키를 누르십시오.
안드로이드 스튜디오는 코드에 템플릿과 관련된 코드 snippet를 삽입합니다.
Live templates allow you to enter code snippets for fast insertion and completion of small chunks of code. To insert a live template, type the template abbreviation and press the Tab key. Android Studio inserts the code snippet associated with the template into your code.

예를 들어, Tab 다음의 newInstance 약어는 아규먼트 플레이스홀더를 가진 새로운 fragment 인스턴스에 코드를 삽입합니다.
또는 캐스트 및 리소스 id 신택스를 따라서, findViewById () 메소드를 삽입하기 위하여 fbc를 입력합니다.
For example, the newInstance abbreviation followed by Tab inserts the code for a new fragment instance with argument placeholders. Or type fbc to insert the findViewById() method along with cast and resource id syntax.

To see the list of supported live templates and customize them, click File > Settings > Editor > Live Templates.

Learn more about Live Templates.

Get quick fixes from Lint

안드로이드 스튜디오는 app을 실행하거나 테스트를 작성하지 않고, 코드의 구조적 품질을 가진 문제를 파악하고 수정하는 것을 도와주는 Lint라는 코드 스캐닝 도구를 제공합니다.
Android Studio provides a code scanning tool called Lint to help you to identify and correct problems with the structural quality of your code, without executing the app or writing tests.

app을 구축할 때 마다, 안드로이드 스튜디오는 잠재적인 버그에 관하여 소스 파일을 체크하고, 정확성, 보안, 성능, 사용성, 접근성, 국제화에서 최적화 개선을 추구합니다.
Every time you build your app, Android Studio runs Lint to check your source files for potential bugs and looks for optimization improvements in correctness, security, performance, usability, accessibility, and internationalization.

Learn more about Lint.

See documentation and resource details

You can view documentation for an API by placing the caret on the method/member/class name and pressing F1.

Information is also available for other resources, such as images and themes. For example, if you place the caret on the theme name in your Android manifest file and press F1, you can see the theme inheritance hierarchy and colors or images for the various attributes.

Quickly create new files

When you want to create a new file, click the desired directory in the Project window, then press Alt + Insert (Command + N on Mac). Android Studio shows a small window with a list of suggested file types, as appropriate for the selected directory.

리소스로 작업하기 Working with Resources


안드로이드 스튜디오에는 아래와 같은 기능과 도구가 포함되어 있어 리소스 파일을 만들고 관리하는 것을 도와줍니다.
Android Studio includes the following features and tools to help you create and manage resource files.

모든 스크린 밀도를 위한 이미지 만들기 Create images for all screen densities

안드로이드 스튜디오에는 각 스크린 밀도를 지원하는 이미지를 만드는 것을 도와주는 Vector Asset Studio라는 도구가 포함되어 있습니다.
편집을 위하여 자신의 SVG 파일을 업로드할 수도 있고, 많은 Google-provided material design icons의 하나로부터 선택할 수도 있습니다.
시작하려면 File > New > Vector Asset를 클릭하세요.
Android Studio includes a tool called Vector Asset Studio that helps you create images that support each screen density. You can upload your own SVG file for editing or select from one of the many Google-provided material design icons. To get started, click File > New > Vector Asset.

Learn more about Vector Asset Studio.

이미지와 컬러 미리보기 Preview images and colors

코드에서 이미지와 아이콘을 참조 할 때,  이미지나 아이콘 참조를 확인할 수 있도록 왼쪽 여백에 이미지의 미리보기가 나타납니다.
When referencing images and icons in your code, a preview of the image appears in the left margin to help you verify the image or icon reference.

전체 크기 이미지를 보려면 왼쪽 여백에 있는 썸네일을 클릭하세요.
또는, asset에 대한 인라인 참조에 caret를 배치하고, 
모든 다른 크기를 포함하는 이미지의 세부 사항을 확인하기 위해 F1을 누릅니다.
To view the full size image, click the thumbnail in the left margin. Or, place the caret on the inline reference to the asset and press F1 to see the image details, including all the alternative sizes.

새 레이아웃 만들기 Create new layouts

안드로이드 스튜디오는 widgets을 레이아웃으로 드래그앤드롭 할 수 있는, 그래서 XML을 편집하는 동안 레이아웃을 미리 볼 수 있는 고급형 레이아웃 편집기를 제공합니다.
Android Studio offers an advanced layout editor that allows you to drag-and-drop widgets into your layout and preview your layout while editing the XML.

To get started, click the module where you want to add the layout, then click File > New > XML > Layout XML File.

Learn more about the Layout Editor.

Translate UI strings

번역 편집기 도구는 번역된 모든 리소스의 단일 view를 주어서, 번역을 변경하거나 추가하는 것을 쉽게 만듭니다.
심지어 strings.xml의 파일의 모든 버전을 열지 않고 누락된 번역을 쉽게 찾을 수하고 있습니다.
문자열 번역 서비스를 주문하는 파일을 업로드 할 수 있습니다.
The Translations Editor tool gives you a single view of all of your translated resources, making it easy to change or add translations, and even find missing translations without opening every version of the strings.xml file. You can even upload your strings file to order translation services.

시작하려면, 다음 열기로 번역 편집기를 클릭 strings.xml의 파일의 사본을 마우스 오른쪽 버튼으로 클릭합니다.
To get started, right-click on any copy of your strings.xml file then click Open Translations Editor.

Learn more about the Translations Editor.

반응형

댓글