2주차 - 화면 생성 (activity)

born_a·2022년 9월 20일
0

AndroidManifest.xml

앱마다 하나씩 있다.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.example.mobileapp">

    <application
        android:allowBackup="true"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.MobileApp"
        tools:targetApi="31">
        <activity
            android:name=".MainActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

액티비티가 하나 있다는거


자바로 코딩하는 곳. 동작을 고치고 싶을 때 수정.


메인 액티비티의 레이아웃 파일

모양을 바꾸는 일 -> activity_main.xml 수정해보자

view라고 하는건 화면을 구성하는 것. 화면에 보인다!

tools: 앱 실행시에는 영향을 못줌

어떤 위젝이든 상하좌우에 constraint가 있다.

가로 방향, 세로방향 중 최소 하나는 연결되어 있어야 제대로 된 위치가 나온다.

cmd + click : 연결이 끊김

모든 위젯은 View를 상속하고 있다.

0개의 댓글

관련 채용 정보