공부/Kotlin

[안드로이드] 화면 구현 기초

ompeom 2020. 8. 28. 17:19

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical"
    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="안녕하세요? 반갑습니다."
        android:textSize="25sp" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="잘 부탁드립니다"
        android:textColor="#FF0000"/>

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="제 이름은 홍길동 입니다."
        android:textStyle="italic"/>

</LinearLayout>

 

화면에 나타낼 때 Layout안에 작성을 한다.

TextView는 글자를 보여준다.

2020/08/28 - [프로그래밍언어/Kotlin] - [안드로이드] 텍스트 뷰(TextView)

 

[안드로이드] 텍스트 뷰(TextView)

개요 사용자에게 문구를 "보여주기만 할 때" 사용 사용자는 이 문구를 수정할 수 없다 View: 직접 내 자신이 화면에 등장해서, 사용자에게 컨텐츠를 표현하는 용도 LinearLayout 등의 그릇에 담기는 ��

90052.tistory.com