Android實現(xiàn)瘋狂連連看游戲之開發(fā)游戲界面(二)-創(chuàng)新互聯(lián)

連連看的游戲界面十分簡單,大致可以分為兩個區(qū)域:
--游戲主界面區(qū)
--控制按鈕和數(shù)據(jù)顯示區(qū)

創(chuàng)新互聯(lián)建站從2013年開始,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項目網(wǎng)站設(shè)計制作、成都網(wǎng)站設(shè)計網(wǎng)站策劃,項目實施與項目整合能力。我們以讓每一個夢想脫穎而出為使命,1280元高密做網(wǎng)站,已為上家服務(wù),為高密各地企業(yè)和個人服務(wù),聯(lián)系電話:18982081108

1、開發(fā)界面布局


本程序使用一個RelativeLayout作為整體的界面布局元素,界面布局上面是一個自定義組件,下面是一個水平排列的LinearLayout。

下面是本程序的布局文件:/res/layout/main.xml


<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
 android:layout_width="fill_parent" android:layout_height="fill_parent" 
 android:background="@drawable/room"> 
 <!-- 游戲主界面的自定義組件 --> 
 <cn.oyp.link.view.GameView 
 android:id="@+id/gameView" android:layout_width="fill_parent" 
 android:layout_height="fill_parent" /> 
 <!-- 水平排列的LinearLayout --> 
 <LinearLayout android:layout_width="fill_parent" 
 android:layout_height="fill_parent" android:orientation="horizontal" 
 android:layout_marginTop="380px" android:background="#1e72bb" 
 android:gravity="center"> 
 <!-- 控制游戲開始的按鈕,該按鈕的背景圖片可以根據(jù)按鈕的狀態(tài)改變 --> 
 <Button android:id="@+id/startButton" android:layout_width="wrap_content" 
 android:layout_height="wrap_content" android:background="@drawable/button_selector" /> 
 <!-- 顯示游戲剩余時間的文本框 --> 
 <TextView android:id="@+id/timeText" android:layout_width="wrap_content" 
 android:layout_height="wrap_content" android:gravity="center" 
 android:textSize="20dip" android:width="150px" android:textColor="#ff9" /> 
 </LinearLayout> 
</RelativeLayout> 

網(wǎng)站欄目:Android實現(xiàn)瘋狂連連看游戲之開發(fā)游戲界面(二)-創(chuàng)新互聯(lián)
本文來源:http://bm7419.com/article34/hsgse.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供做網(wǎng)站、小程序開發(fā)、虛擬主機App設(shè)計、Google標簽優(yōu)化

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

網(wǎng)站托管運營