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

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

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

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


本程序使用一個(gè)RelativeLayout作為整體的界面布局元素,界面布局上面是一個(gè)自定義組件,下面是一個(gè)水平排列的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"> 
 <!-- 控制游戲開(kāi)始的按鈕,該按鈕的背景圖片可以根據(jù)按鈕的狀態(tài)改變 --> 
 <Button android:id="@+id/startButton" android:layout_width="wrap_content" 
 android:layout_height="wrap_content" android:background="@drawable/button_selector" /> 
 <!-- 顯示游戲剩余時(shí)間的文本框 --> 
 <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實(shí)現(xiàn)瘋狂連連看游戲之開(kāi)發(fā)游戲界面(二)-創(chuàng)新互聯(lián)
本文來(lái)源:http://muchs.cn/article34/hsgse.html

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

廣告

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

網(wǎng)站托管運(yùn)營(yíng)