안드로이드 개발-안드로이드 계산기

37346 단어 안드로이드 개발
안드로이드 개발은 처음이라 조금 굴곡이 있었지만 다행히 이틀간의 노력 끝에 해낼 수 있었다.
우선res/layout의 폴더에activity 설정하기main.xml 파일
이것은 안드로이드 페이지 파일로 인터페이스에 대한 컨트롤은 모두 여기에 정의되어 있다. 예를 들어 안에 내용을 쓴다.
    <TableRow> 

        <LinearLayout android:orientation="horizontal" 

            android:layout_width="fill_parent" android:layout_height="wrap_content" 

            android:textSize="42sp" android:layout_weight="1"> 

            <Button android:id="@+id/opLEFT" android:layout_width="fill_parent" 

                android:layout_height="wrap_content" android:textSize="30sp" 

                android:text="(" android:layout_weight="1" /> 

            <Button android:id="@+id/opRIGHT" android:layout_width="fill_parent" 

                android:layout_height="wrap_content" android:textSize="30sp" 

                android:text=")" android:layout_weight="1" /> 

            <Button android:id="@+id/opDEL" android:layout_width="fill_parent" 

                android:layout_height="wrap_content" android:textSize="30sp" 

                android:text="DEL" android:layout_weight="1" /> 

            <Button android:id="@+id/opCLS" android:layout_width="fill_parent" 

                android:layout_height="wrap_content" android:textSize="30sp" 

                android:text="CLS" android:layout_weight="1" /> 

        </LinearLayout> 

    </TableRow>


위의
는 한 줄로 웹 탭 와 유사합니다
탭은 이 줄에 선형 레이아웃을 추가합니다. 이 레이아웃 속성에 대한 정의가 있습니다.

좋은 웹페이지 즐겨찾기