撸代码记录篇2.1-奔跑的皮皮熊

来源:互联网 发布:sql合计多个列的值 编辑:程序博客网 时间:2024/06/06 14:21

一、装备选择界面

<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"    xmlns:tools="http://schemas.android.com/tools"    android:id="@+id/activity_main"    android:layout_width="match_parent"    android:layout_height="match_parent"    android:paddingBottom="@dimen/activity_vertical_margin"    android:paddingLeft="@dimen/activity_horizontal_margin"    android:paddingRight="@dimen/activity_horizontal_margin"    android:paddingTop="@dimen/activity_vertical_margin"    tools:context="com.example.john.equipment_select.MainActivity">    <TextView        android:id="@+id/pet_dialog_tv"        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:layout_centerHorizontal="true"        android:layout_marginBottom="25dp"        android:gravity="center"        android:text="主人,快给小宝宝买装备吧"/>    <TableLayout        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:layout_centerHorizontal="true"        android:layout_marginBottom="20dp">        <TableRow            android:layout_width="match_parent"            android:layout_height="wrap_content">            <TextView                android:layout_width="0dip"                android:layout_height="wrap_content"                android:layout_weight="1"                android:text="生命值"                android:textColor="#00ff00"                android:textSize="14sp"/>            <ProgressBar                android:id="@+id/progressBar1"                style="?android:attr/progressBarStyleHorizontal"                android:layout_width="0dip"                android:layout_height="wrap_content"                android:layout_gravity="center"                android:layout_weight="2"/>            <TextView                android:id="@+id/tv_life_progress"                android:layout_width="0dip"                android:layout_height="wrap_content"                android:layout_weight="1"                android:text="0"                android:gravity="center"                android:textColor="#000000"/>        </TableRow>        <TableRow            android:layout_width="match_parent"            android:layout_height="wrap_content">            <TextView                android:layout_width="0dip"                android:layout_height="wrap_content"                android:layout_weight="1"                android:text="攻击力"                android:textColor="#000000"                android:textSize="14sp"/>            <ProgressBar                android:id="@+id/progressBar2"                style="?android:attr/progressBarStyleHorizontal"                android:layout_width="0dip"                android:layout_height="wrap_content"                android:layout_gravity="center"                android:layout_weight="2"/>            <TextView                android:id="@+id/tv_attack_progress"                android:layout_width="0dip"                android:layout_height="wrap_content"                android:layout_weight="1"                android:text="0"                android:gravity="center"                android:textColor="#000000"/>        </TableRow>        <TableRow            android:layout_width="match_parent"            android:layout_height="wrap_content">            <TextView                android:layout_width="0dip"                android:layout_height="wrap_content"                android:layout_weight="1"                android:text="敏捷"                android:textColor="#000000"                android:textSize="14sp"/>            <ProgressBar                android:id="@+id/progressBar3"                style="?android:attr/progressBarStyleHorizontal"                android:layout_width="0dip"                android:layout_height="wrap_content"                android:layout_gravity="center"                android:layout_weight="2"/>            <TextView                android:id="@+id/tv_speed_progress"                android:layout_width="0dip"                android:layout_height="wrap_content"                android:layout_weight="1"                android:text="0"                android:gravity="center"                android:textColor="#000000"/>        </TableRow>    </TableLayout>    <RelativeLayout        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:layout_marginLeft="50dp"        android:layout_marginRight="50dp"        android:layout_marginTop="20dp">        <Button            android:id="@+id/btn_baby"            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:drawablePadding="3dp"            android:drawableRight="@android:drawable/ic_menu_add"            android:onClick="click"            android:text="小宝宝买装备"            android:textSize="14sp"/>    </RelativeLayout></RelativeLayout>

0 0