疯狂猜图界面;relative界面是可以叠加的,先写的在下面

本文深入探讨了Unity3D和Unreal Engine两大游戏引擎的使用技巧,包括动画、VR、AR等特性,以及如何在游戏开发中实现高效的工作流程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >


    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/background"
        android:orientation="vertical" >


        <LinearLayout
            android:id="@+id/header_bar"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:orientation="horizontal"
            android:paddingLeft="5dp"
            android:paddingRight="5dp" >


            <Button
                android:id="@+id/back_btn"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1" />


            <TextView
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1.5" />


            <TextView
                android:id="@+id/stage_num"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="0.9"
                android:gravity="center"
                android:textColor="#ffffff"
                android:textSize="10sp" />


            <TextView
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1" />


            <LinearLayout
                android:layout_width="0sp"
                android:layout_height="match_parent"
                android:layout_marginBottom="5sp"
                android:layout_marginTop="5sp"
                android:layout_weight="1.4"
                android:background="#1D338A"
                android:orientation="horizontal"
                android:paddingLeft="5sp" >


                <ImageView
                    android:id="@+id/coin_img"
                    android:layout_width="0sp"
                    android:layout_height="match_parent"
                    android:layout_weight="1" />


                <TextView
                    android:id="@+id/coin_text"
                    android:layout_width="0sp"
                    android:layout_height="match_parent"
                    android:layout_weight="2"
                    android:gravity="center"
                    android:textColor="#ffffff"
                    android:textSize="10sp" />
            </LinearLayout>
        </LinearLayout>


        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0sp"
            android:layout_weight="6.5"
            android:orientation="horizontal" >


            <LinearLayout
                android:layout_width="0sp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:orientation="vertical"
                android:paddingLeft="5sp" >


                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="0sp"
                    android:layout_weight="1.5" />


                <Button
                    android:id="@+id/delete_text_btn"
                    android:layout_width="match_parent"
                    android:layout_height="0sp"
                    android:layout_marginBottom="10sp"
                    android:text="30"
                    android:textSize="10sp"
                    android:gravity="center_horizontal"
                    android:paddingTop="30sp"
                    android:layout_weight="1.2" />


                <Button
                    android:id="@+id/propt_text_btn"
                    android:layout_width="match_parent"
                    android:layout_height="0sp"
                    android:text="90"
                    android:textSize="10sp"
                    android:paddingTop="30sp"
                     android:gravity="center_horizontal"
                    android:layout_weight="1.2" />


                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="0sp"
                    android:layout_weight="0.5" />
            </LinearLayout>


            <RelativeLayout
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="3.5" >


                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="vertical"
                    android:paddingLeft="5dp"
                    android:paddingRight="5dp" >


                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="0sp"
                        android:layout_weight="1" />


                    <ImageView
                        android:id="@+id/main_image"
                        android:layout_width="match_parent"
                        android:layout_height="0sp"
                        android:layout_weight="3.5" />
                    <!-- relative中图片可以叠加,这个LinearLayout在下面 -->

                </LinearLayout>


                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="horizontal" >


                    <TextView
                        android:layout_width="0dp"
                        android:layout_height="match_parent"
                        android:layout_weight="1" />


                    <LinearLayout
                        android:layout_width="0dp"
                        android:layout_height="match_parent"
                        android:layout_weight="3"
                        android:orientation="vertical" >


                        <TextView
                            android:layout_width="match_parent"
                            android:layout_height="0sp"
                            android:layout_weight="0.7" />


                        < TextView
                            android:id="@+id/answer_type"
                            android:layout_width="match_parent"
                            android:layout_height="0dp"
                            android:layout_weight="0.4"
                            android:gravity="center_horizontal"
                            android:textColor="#ffffff"
                            android:textSize="10sp" />
 <!-- relative中图片可以叠加,这个LinearLayout在上面 -->


                        <TextView
                            android:layout_width="match_parent"
                            android:layout_height="0sp"
                            android:layout_weight="3.6" />
                       
                    </LinearLayout>


                    <TextView
                        android:layout_width="0sp"
                        android:layout_height="match_parent"
                        android:layout_weight="1" />
                </LinearLayout>
            </RelativeLayout>


            <LinearLayout
                android:layout_width="0sp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:orientation="vertical" >
            </LinearLayout>
        </LinearLayout>


        <com.kane.crazyneedkane.view.AnswerView
            android:id="@+id/answer_view"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="2.5" >
        </com.kane.crazyneedkane.view.AnswerView>


        <GridView
            android:id="@+id/select_text_grid"
            android:layout_width="match_parent"
            android:layout_height="0sp"
            android:layout_weight="4"
            android:numColumns="8" >
        </GridView>


        <TextView
            android:layout_width="match_parent"
            android:layout_height="0sp"
            android:layout_weight="0.3" />
    </LinearLayout>
        
    <!-- 默认隐藏,答案正确后显示 ,android:background="#dd000000"半透明 ,八个0是全透明 -->
    <LinearLayout
        android:id="@+id/winLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#dd000000"
        android:orientation="horizontal"
        android:visibility="invisible" >



        <TextView
            android:layout_width="0sp"
            android:layout_height="match_parent"
            android:layout_weight="1" />


        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:orientation="vertical" >


            <TextView
                android:layout_width="match_parent"
                android:layout_height="0sp"
                android:layout_weight="2" />


            <TextView
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight="1"
                android:gravity="center"
                android:text="答案正确"
                android:textColor="#ffffff"
                android:textSize="22dp" />


            <TextView
                android:layout_width="match_parent"
                android:layout_height="0sp"
                android:layout_weight="1.5" />


            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="0sp"
                android:layout_marginBottom="20dp"
                android:layout_weight="1"
                android:orientation="horizontal" >


                <TextView
                    android:layout_width="0sp"
                    android:layout_height="match_parent"
                    android:layout_weight="1" />


                <TextView
                    android:id="@+id/win_stage_num"
                    android:layout_width="0sp"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:gravity="center"
                    android:textColor="#ffffff"
                    android:textSize="10dp" />


                <TextView
                    android:layout_width="0sp"
                    android:layout_height="match_parent"
                    android:layout_weight="1" />
            </LinearLayout>
             <TextView
                    android:id="@+id/win_answer_text"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_weight="0.5"
                    android:gravity="center"
                    android:textColor="#ffffff"
                    android:textSize="10dp" />
              <TextView
                android:layout_width="match_parent"
                android:layout_height="0sp"
                android:layout_weight="2" />
              <Button android:id="@+id/next_btn"
                  android:layout_width="match_parent"
                  android:layout_height="0dp"
                  android:layout_weight="1"/>
               <TextView
                   android:id="@+id/game_over"
                android:layout_width="match_parent"
                android:layout_height="0sp"
                android:layout_weight="1"
                android:text="未完待续"
                android:visibility="invisible"
                android:textColor="#ffffff"
                android:textSize="20dp"
                android:gravity="center" />
               
            <TextView
                android:layout_width="match_parent"
                android:layout_height="0sp"
                android:layout_weight="2.5" />
        </LinearLayout>


        <TextView
            android:layout_width="0sp"
            android:layout_height="match_parent"
            android:layout_weight="1" />
    </LinearLayout>


</RelativeLayout>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值