集合一些基礎小遊戲、小工具,用 android studio 開發手機 app
- 了解各種 layout 的差別
- 在各個畫面之間傳遞 variables
- 學習在 layout 中建立動畫與著色
- rotate 動畫的應用
- 在基本玩法上做一些改變
- 把接球板的移動改用==三軸穩定器==控制
- 翻牌動畫,在兩個卡片不同時,需恢復成原本的樣子
- 搭配 android 的 toast 互動
\ Deal with the sceen pixel problem in different cellphone /
- add the program below into the " AndroidManifest.xml "
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"
/>
- Change the units in ' .kt ' files. From 'dp' to 'dip'
- but it's not work (01/05)
- Noticed the symbol of the margin
- (referenced link)
- after changing the symbol
- successful !!(01/07)
1. Build apk,two icons were created
- Find out in the file " AndroidManifest " ( in the ' manifests ' folder )
- Inside the activity label if there's an " intent-filter " label.Then, it'll turn out to be an icon after installing the apk
- Usually, there will be only one " intent-filter " label which is in the MainActivity
2.When using the View object from Widget, we need to connect the object in xml with the view.kt file
- change the label of the view object in xml like below
<com.example.practice.snake.snakeView
android:id="@+id/game"
......
tools:visibility="visible" />
or
1. when cancel is pressed,the screen stay unchanged
- Solved !!
add
finish()
to go back to the previous layout
2. whether the head of the snake can be painted into different color from the body
3. the game over messange have no score on it
- Solved ! (01/07)
4. to use the snake to write out the name which the user input
1. Use Triaxial accelerometer to control the catching paddle
- Solved!
1. toast do not appear right away