Android- BMI 수치 계산기 만들기(1)

Code_Alpacat·2021년 11월 3일

안드로이드 기초

목록 보기
9/18

기본적인 레이아웃과 아래와 같은 기능들을 배웠다. 사실 매우 기본적인 내용이고 어느정도 알고있어서 빠르게 넘길 수 있었다.

  • LinearLayout
  • EditText : 레터박스를 생성해 입력받을 수 있는 기능
  • TextView : 텍스트를 생성
  • Button : 버튼을 생성
  • orientation : 수직 또는 수평으로 배치할 수 있게 해주는 기능
  • inputType : 입력받을 타입의 키보드를 선택하는 기능
<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:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity"
    android:orientation="vertical">
<TextView
    android:text="신장"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"/>

<EditText
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:inputType="number" />

<TextView
    android:text="체중"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"/>
<EditText
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:inputType="number"
    />

<Button
    android:text="확인"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"/>
```
profile
In the future, I'm never gonna regret, cuz I've been trying my best for every single moment.

0개의 댓글