Browse Source

yujie : 图表ui相关

jieyu 4 years ago
parent
commit
20c4e8c5ba

+ 11 - 12
RMA/app/src/main/res/layout/activity_chart.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout
+<RelativeLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_width="match_parent"
@@ -10,9 +10,6 @@
         android:id="@+id/title_lay"
         android:id="@+id/title_lay"
         android:layout_width="match_parent"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_height="wrap_content"
-        app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintRight_toLeftOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
         android:background="@color/main_title_bg_color"
         android:background="@color/main_title_bg_color"
         >
         >
 
 
@@ -93,13 +90,15 @@
 
 
     </RelativeLayout>
     </RelativeLayout>
 
 
-    <!-- 图表信息 -->
-    <androidx.recyclerview.widget.RecyclerView
-        android:id="@+id/goodsInfo_rv"
-        android:layout_width="wrap_content"
+    <!-- 图表属性 -->
+    <include
+        android:id="@+id/chart_info_lay"
+        layout="@layout/chart_info_layout"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_height="wrap_content"
-        app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintRight_toLeftOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/title_lay" />
+        android:layout_below="@+id/title_lay"
+
+        />
+
 
 
-</androidx.constraintlayout.widget.ConstraintLayout>
+</RelativeLayout>

+ 422 - 0
RMA/app/src/main/res/layout/chart_info_layout.xml

@@ -0,0 +1,422 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:padding="10dp"
+    android:orientation="horizontal">
+
+    <!-- 第一行 -->
+    <LinearLayout
+        android:id="@+id/first_lay"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:layout_marginEnd="10dp"
+        android:orientation="vertical">
+
+        <!-- 现价 -->
+        <RelativeLayout
+            android:id="@+id/now_price"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/now_price_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:text="000000" />
+
+            <TextView
+                android:id="@+id/now_price_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:layout_centerVertical="true"
+                android:text="000000" />
+
+        </RelativeLayout>
+
+        <!-- 涨跌 涨幅 -->
+        <RelativeLayout
+            android:id="@+id/up_down"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/up_down_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:text="000000" />
+
+            <TextView
+                android:id="@+id/up_down_present"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="000000" />
+
+        </RelativeLayout>
+
+        <!-- 成交量 -->
+        <RelativeLayout
+            android:id="@+id/business_value"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/business_value_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:text="成交量" />
+
+            <TextView
+                android:id="@+id/business_value_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="000000" />
+
+        </RelativeLayout>
+
+        <!-- 持仓量 -->
+        <RelativeLayout
+            android:id="@+id/holder_amount"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/holder_amount_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:text="持仓量" />
+
+            <TextView
+                android:id="@+id/holder_amount_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="000000" />
+
+        </RelativeLayout>
+
+        <!-- 作结 -->
+        <RelativeLayout
+            android:id="@+id/daily_settlement"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/daily_settlement_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:text="作&#8195;结" />
+
+            <TextView
+                android:id="@+id/daily_settlement_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="000000" />
+
+        </RelativeLayout>
+
+        <!-- 昨收 -->
+        <RelativeLayout
+            android:id="@+id/daily_close"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/daily_close_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:text="昨&#8195;收" />
+
+            <TextView
+                android:id="@+id/daily_close_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="000000" />
+
+        </RelativeLayout>
+
+    </LinearLayout>
+
+    <!-- 第二行 -->
+    <LinearLayout
+        android:id="@+id/second_lay"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="10dp"
+        android:layout_marginEnd="10dp"
+        android:layout_weight="1"
+        android:orientation="vertical">
+
+        <!-- 卖价 -->
+        <RelativeLayout
+            android:id="@+id/sell_price"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/sell_price_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:text="卖&#8195;价" />
+
+            <TextView
+                android:id="@+id/sell_price_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:layout_centerVertical="true"
+                android:text="000000" />
+
+        </RelativeLayout>
+
+        <!-- 买价 -->
+        <RelativeLayout
+            android:id="@+id/buy_price"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/buy_price_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:text="买&#8195;价" />
+
+            <TextView
+                android:id="@+id/buy_price_present"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="000000" />
+
+        </RelativeLayout>
+
+        <!-- 最高 -->
+        <RelativeLayout
+            android:id="@+id/highest_price"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/highest_price_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:text="最&#8195;高" />
+
+            <TextView
+                android:id="@+id/highest_price_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="000000" />
+
+        </RelativeLayout>
+
+        <!-- 最低 -->
+        <RelativeLayout
+            android:id="@+id/lowest_price"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/lowest_price_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:text="最&#8195;低" />
+
+            <TextView
+                android:id="@+id/lowest_price_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="000000" />
+
+        </RelativeLayout>
+
+        <!-- 涨停 -->
+        <RelativeLayout
+            android:id="@+id/trading_limit"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/trading_limit_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:text="涨&#8195;停" />
+
+            <TextView
+                android:id="@+id/trading_limit_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="000000" />
+
+        </RelativeLayout>
+
+        <!-- 跌停 -->
+        <RelativeLayout
+            android:id="@+id/drop_limit"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/drop_limit_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:text="跌&#8195;停" />
+
+            <TextView
+                android:id="@+id/drop_limit_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="000000" />
+
+        </RelativeLayout>
+    </LinearLayout>
+
+    <!-- 第三行 -->
+    <LinearLayout
+        android:id="@+id/third_lay"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:layout_marginStart="10dp"
+        android:orientation="vertical">
+
+        <!-- 卖量 -->
+        <RelativeLayout
+            android:id="@+id/sell_amount"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/sell_amount_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:text="卖&#8195;量" />
+
+            <TextView
+                android:id="@+id/sell_amount_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:layout_centerVertical="true"
+                android:text="000000" />
+
+        </RelativeLayout>
+
+        <!-- 买量 -->
+        <RelativeLayout
+            android:id="@+id/buy_amount"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/buy_amount_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:text="买&#8195;量" />
+
+            <TextView
+                android:id="@+id/buy_amount_present"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="000000" />
+
+        </RelativeLayout>
+
+        <!-- 开盘 -->
+        <RelativeLayout
+            android:id="@+id/opening_quotation"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/opening_quotation_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:text="开&#8195;盘" />
+
+            <TextView
+                android:id="@+id/opening_quotation_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="000000" />
+
+        </RelativeLayout>
+
+        <!-- 均价 -->
+        <RelativeLayout
+            android:id="@+id/average_price"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/laverage_price_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:text="均&#8195;价" />
+
+            <TextView
+                android:id="@+id/average_price_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="000000" />
+
+        </RelativeLayout>
+
+        <!-- 结算 -->
+        <RelativeLayout
+            android:id="@+id/settlement_price"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:id="@+id/settlement_price_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentStart="true"
+                android:text="结&#8195;算" />
+
+            <TextView
+                android:id="@+id/settlement_price_value"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:text="000000" />
+
+        </RelativeLayout>
+
+
+
+
+    </LinearLayout>
+
+
+</LinearLayout>