zoukankan      html  css  js  c++  java
  • 团队冲刺第七天

    1、今天进行定位的时候的相关界面你的修改。加入了计时器和距离以及速度。现在速度和距离没有进行测试。但是计时器已经测试过了。可以使用布局文件如下。以及运行结果。明天将测试距离显示和素的获取。:

    <?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:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/layout_bg"
        android:id="@+id/sport_content"
        tools:context=".DynamicDemo">
        <RelativeLayout
            android:id="@+id/rlMap"
            android:layout_width="match_parent"
            android:layout_height="match_parent">
    
            <com.baidu.mapapi.map.MapView
                android:id="@+id/bmapView"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />
        </RelativeLayout>
    
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@drawable/sport_change_bg">
    
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="@dimen/title_height"
                android:layout_marginTop="@dimen/spacing_normal"
                android:orientation="horizontal">
    
                <TextView
                    android:id="@+id/tv_mode"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:layout_marginStart="@dimen/margin_edge"
                    android:drawableStart="@mipmap/run_mode"
                    android:drawablePadding="5dp"
                    android:gravity="center_vertical"
    
                    android:text="开始运动"
                    android:textColor="@color/red"
                    android:textColorLink="@color/red"
                    android:textSize="@dimen/textsize_8"
                    android:layout_marginLeft="@dimen/margin_edge"
                    android:drawableLeft="@mipmap/map_mode" />
                <TextView
                    android:id="@+id/textView1"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="30px"
                    android:layout_weight="3"
                    android:gravity="center"
                    android:text="时间提醒" />
                <EditText
                    android:id="@+id/setTimeEdit"
                    android:layout_width="500px"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:layout_marginRight="10px"
    
                    android:width="2dp"
                    android:maxLength="4"
                    android:text="1"
                    android:ems="3"
                    android:inputType="number" >
                    <requestFocus />
                </EditText>
    
                <TextView
                    android:id="@+id/textView2"
                    android:layout_width="fill_parent"
                    android:layout_height="59dp"
                    android:layout_gravity="left"
                    android:layout_marginRight="2px"
                    android:layout_weight="3"
                    android:gravity="left"
                    android:text="分钟" />
            </LinearLayout>
        </RelativeLayout>
    
        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/margin_edge_20"
            android:layout_marginTop="110dp"
            android:orientation="vertical"
            android:layout_marginLeft="@dimen/margin_edge_20">
            <Chronometer
                android:id="@+id/cm_passtime"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:ellipsize="end"
                android:format="00:00:00"
                android:gravity="center"
                android:textColor="@color/text_color_white"
                android:textSize="65sp"
                android:textStyle="bold" />
    
            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/margin_edge_20"
                android:orientation="horizontal">
    
                <TextView
                    android:id="@+id/tvMileage"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:ellipsize="end"
                    android:maxLength="8"
                    android:text="0.00"
                    android:textColor="@color/text_color_white"
                    android:textSize="26sp"
                    android:textStyle="bold" />
    
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="bottom"
                    android:layout_marginStart="6dp"
                    android:layout_marginBottom="2.5dp"
                    android:text="米"
                    android:textColor="@color/text_color_white"
                    android:textSize="@dimen/textsize_2"
                    android:layout_marginLeft="6dp" />
    
                <TextView
                    android:id="@+id/tvSpeed"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="@dimen/margin_edge_20"
                    android:ellipsize="end"
                    android:maxLength="8"
                    android:text="0.00"
                    android:textColor="@color/text_color_white"
                    android:textSize="26sp"
                    android:textStyle="bold"
                    android:layout_marginLeft="@dimen/margin_edge_20" />
    
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="bottom"
                    android:layout_marginStart="6dp"
                    android:layout_marginBottom="2.5dp"
                    android:text="配速(米/秒)"
                    android:textColor="@color/text_color_white"
                    android:textSize="@dimen/textsize_2"
                    android:layout_marginLeft="6dp" />
            </LinearLayout>
    
        </LinearLayout>
    
        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="1350px"
            android:layout_centerHorizontal="true"
            android:orientation="horizontal"
            android:paddingBottom="30dp">
    
    
            <Button
                android:id="@+id/anniuyi"
                android:layout_width="70dp"
                android:layout_height="70dp"
                android:layout_marginLeft="20dp"
                android:layout_marginRight="20dp"
                android:background="@drawable/sport_white_round"
                android:gravity="center"
                android:text="暂停"
                android:textColor="@color/text_color_green"
                android:textSize="18sp" />
    
            <Button
                android:id="@+id/anniuer"
                android:layout_width="70dp"
                android:layout_height="70dp"
                android:background="@drawable/sport_white_round"
                android:gravity="center"
                android:text="继续"
                android:textColor="@color/text_color_green"
                android:textSize="18sp" />
    
        </LinearLayout>
    
        <RelativeLayout
            android:id="@+id/progressBarRl"
            android:layout_width="match_parent"
            android:layout_height="80dp"
            android:layout_alignParentBottom="true"
            android:visibility="gone"
            android:background="@android:color/white">
    
            <TextView
                android:id="@+id/info"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:textColor="@android:color/black"
                android:text="GPS信号连接中,请稍后..." />
    
            <ProgressBar
                android:id="@+id/progressBar"
                android:layout_width="wrap_content"
                android:paddingLeft="20dp"
                android:layout_centerVertical="true"
                android:paddingRight="10dp"
                android:layout_toLeftOf="@id/info"
                android:layout_height="wrap_content" />
        </RelativeLayout>
    
    </RelativeLayout>

  • 相关阅读:
    hdu5945 Fxx and game
    hdu5937 Equation
    2016-2017 CT S03E06: Codeforces Trainings Season 3 Episode 6 The Baguette Master
    Canada Cup 2016 D. Contest Balloons
    hdu5798 Stabilization
    bzoj 4026 dC Loves Number Theory
    Intel Code Challenge Final Round (Div. 1 + Div. 2, Combined) C. Ray Tracing
    hdu5923 Prediction
    hdu5925 Coconuts
    2016弱校联盟十一专场10.2 Longest Increasing Subsequence
  • 原文地址:https://www.cnblogs.com/dazhi151/p/12748723.html
Copyright © 2011-2022 走看看