개발/Android
안드로이드 스튜디오 Hello World!
윤호
2019. 11. 22. 22:11
activiti_main.xml로 갑니다
안드로이드 스튜디오에서 파일 찾기는 shift연속 두번 누르기입니다.
xml에서 Design형식으로 간편하게 만들수도 있지만 Text형식으로 코딩해보겠습니다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Hello! World!"
android:textSize="15sp"
android:textColor="@android:color/black"/>
</LinearLayout>
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
|
전에 xml에 있던 코드들을 지우고 위의 코드를 입력한다.
match_parent는 화면에 꽉차게 하는 것이다.

xml파일에서 design을 눌러보면 메인화면에서 Hello! World!를 볼수있다.
헬로 다음의 느낌표는 오타다..
틀린 부분 지적해주시면 감사하겠습니다.
이 글은 유튜브 센치한 개발자님의 안드로이드 스튜디오 기초강의를 공부한 내용입니다.