[안드로이드스튜디오] 기본 구성

728x90
반응형

프로젝트를 생성해보자

가장 기본인 empty activity를 선택


나는 자바를 선택했지만 새로 배우는분은 코틀린을 권장!!

요래 나온다

요게 기본인데
메니패스트는 각 페이지들의 설정이 들어가고

메인엑티비티는 기능적인 요소를 구현할 자바
drawble에는 그림파일이나 xml파일 같은 꾸미기 첨부파일들
layout에서는 한 페이지를 꾸미는 파일이다 xml로 꾸민다

value에있는 color은 각 기본적인 색상과 테마

string은 언어이다 여기서 한국어 영어 중국어등을 추가해서 다국어가 지원되는 app을 만들수 있다.

이대로 컴파일하면

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

기본 xml에 의해 헬로 월드라는 글자를 휴대폰에서 볼 수 있다.
gradle이라는 곳은 각종 라이브러리를 쉽게 다운받아 사용할 수 있게 해준다.
휴대폰과의 연결은 아무생각 없이 휴대폰 데이터케이블을 연결하고 개발자 모드로 해두면 된다.

일단 겉핧기로 기초중에 기초 만 설명해봤다.

알아야 할게 많지만 이정도는 알고있자

728x90
반응형