GameWither 개발일지 (2)

혀니앤·2021년 1월 29일
0

이모저모

목록 보기
2/18
  1. 애니메이션 주는 법

1) resource에 anim 파일을 만든다

2) scale.xml 파일의 경우, 스케일에 해당하는 애니메이션 속성들을 적어준다

<scale xmlns:android="http://schemas.android.com/apk/res/android"

android:duration="4000" // 진행 시간

android:fromXScale="0.0" //x 초기 크기

android:fromYScale="0.0"

android:toXScale="1.0" //x 크기

android:toYScale="1.0"

android:pivotX="50%" //x의 위치

android:pivotY="50%"

android:fillAfter="true"> //애니메이션이 끝난 이후에도 마지막 상태로 냅둘지

3) 해당 액티비티에 코드를 추가해준다 startAnimation으로 인트로 화면에 넣어줬음

(크기 커지는게 alpha)

  1. 버튼 만드는 법

1)drawble 파일에 xml 파일로 버튼의 모양을 정해준다

2) 버튼의 background에 drawble 파일을 넣어준다

<shape xmlns:android="http://schemas.android.com/apk/res/android"

android:shape="rectangle" >

<corners android:bottomRightRadius="20dp"

android:bottomLeftRadius="20dp"

android:topLeftRadius="20dp"

android:topRightRadius="20dp"/> //외부 테두리 둥글게 만들기

<stroke

android:width="0dp"

android:color="#000000" />

profile
일단 시작하기

0개의 댓글