app/src/main/AndroidManifest.xml
@@ -17,7 +17,7 @@ android:supportsRtl="true" android:name=".app" android:theme="@style/AppTheme"> <activity android:name="safeluck.drive.evaluation.TestActivity" android:screenOrientation="landscape" > <activity android:name="safeluck.drive.evaluation.MainActivity" android:screenOrientation="landscape" > <intent-filter> <action android:name="android.intent.action.MAIN" /> app/src/main/java/safeluck/drive/evaluation/adapter/ScoreAdapter.java
@@ -72,17 +72,17 @@ dataHodler = (DataHodler) convertView.getTag(); } if (getItemId(position) %2 == 0){ convertView.setBackgroundColor(Color.parseColor("#67a8bc")); convertView.setBackground(mContext.getResources().getDrawable(R.drawable.stu_score_item)); }else{ convertView.setBackgroundColor(mContext.getResources().getColor(R.color.train_bg)); convertView.setBackground(mContext.getResources().getDrawable(R.drawable.stu_score_item_other)); } ScoreBean scoreBean = getItem(position); dataHodler.tv_item.setTextColor(Color.parseColor("#0e0cca")); dataHodler.tv_item.setTextColor(Color.parseColor("#FFFFFF")); dataHodler.tv_item.setText(scoreBean.getItem()); dataHodler.tv_score.setTextColor(Color.parseColor("#0e0cca")); dataHodler.tv_score.setText(String.valueOf(scoreBean.getScore())); dataHodler.tv_reason.setTextColor(Color.parseColor("#0e0cca")); dataHodler.tv_score.setTextColor(Color.parseColor("#FE910B")); dataHodler.tv_score.setText(String.format("-%.0f分",scoreBean.getScore())); dataHodler.tv_reason.setTextColor(Color.parseColor("#FFFFFF")); dataHodler.tv_reason.setText(scoreBean.getReason()); return convertView; } app/src/main/res/drawable/gps.pngapp/src/main/res/drawable/head_select1.png
app/src/main/res/drawable/stu_score_bg.xml
New file @@ -0,0 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <size android:width="484dp" android:height="40dp"/> <stroke android:color="#11468A" android:width="1dp"/> <corners android:radius="5dp"/> </shape> app/src/main/res/drawable/stu_score_item.xml
New file @@ -0,0 +1,21 @@ <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:right="10px" android:bottom="10px"> <shape> <padding android:bottom="0dp" android:left="1dp" android:right="1dp" android:top="0dp" /> </shape> </item> <item > <shape android:shape="rectangle"> <solid android:color="#26324B"/> </shape> </item> </layer-list> app/src/main/res/drawable/stu_score_item_other.xml
New file @@ -0,0 +1,21 @@ <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:right="10px" android:bottom="10px"> <shape> <padding android:bottom="0dp" android:left="1dp" android:right="1dp" android:top="0dp" /> </shape> </item> <item > <shape android:shape="rectangle"> <solid android:color="#15223D"/> </shape> </item> </layer-list> app/src/main/res/drawable/stu_score_title.xml
New file @@ -0,0 +1,22 @@ <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:right="10px" android:bottom="10px"> <shape> <padding android:bottom="0dp" android:left="1dp" android:right="1dp" android:top="1dp" /> </shape> </item> <item > <shape android:shape="rectangle"> <solid android:color="#194156"/> <corners android:topLeftRadius="5dp" android:topRightRadius="5dp"/> </shape> </item> </layer-list> app/src/main/res/layout/layout_home_fragment.xml
@@ -3,7 +3,65 @@ android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto"> <RelativeLayout android:layout_width="560dp" android:layout_height="254dp" android:layout_centerInParent="true"> <RelativeLayout android:layout_width="280dp" android:layout_height="122dp" android:background="@drawable/sys_home_part_bg" android:id="@+id/network_train" > <include android:layout_width="match_parent" android:layout_height="match_parent" android:layout_centerInParent="true" layout="@layout/layout_sys_home_part"/> </RelativeLayout> <RelativeLayout android:layout_width="280dp" android:layout_height="122dp" android:background="@drawable/sys_home_part_bg" android:layout_toRightOf="@+id/network_train" android:id="@+id/car_train" > <include android:layout_width="280dp" android:layout_height="122dp" android:layout_centerInParent="true" layout="@layout/layout_sys_home_part_train"/> </RelativeLayout> <RelativeLayout android:layout_width="280dp" android:layout_height="122dp" android:layout_marginTop="7dp" android:background="@drawable/sys_home_part_bg" android:id="@+id/system_setting" android:layout_below="@+id/network_train" > <include android:layout_width="280dp" android:layout_height="122dp" android:layout_centerInParent="true" layout="@layout/layout_sys_home_part_set"/> </RelativeLayout> <RelativeLayout android:layout_width="280dp" android:layout_height="122dp" android:background="@drawable/sys_home_part_bg" android:id="@+id/exit_sys" android:layout_marginTop="7dp" android:layout_toRightOf="@+id/system_setting" android:layout_below="@+id/network_train" > <include android:layout_width="280dp" android:layout_height="122dp" android:layout_centerInParent="true" layout="@layout/layout_sys_home_part_exit"/> </RelativeLayout> <safeluck.drive.evaluation.customview.CircleImageView android:layout_width="104dp" android:layout_height="104dp" @@ -14,80 +72,10 @@ /> </RelativeLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" android:gravity="center" android:visibility="gone" > <LinearLayout android:layout_width="100dp" android:layout_height="100dp" android:gravity="center" android:id="@+id/network_train" android:layout_weight="1" android:orientation="vertical"> <safeluck.drive.evaluation.customview.CircleImageView style="@style/home_fragment_icon" android:src="@drawable/vehicle_network" /> <TextView style="@style/home_fragment_text_sub" android:text="@string/vehicle_net" /> </LinearLayout> <LinearLayout android:layout_width="100dp" android:layout_height="100dp" android:gravity="center" android:layout_weight="1" android:id="@+id/car_train" android:orientation="vertical"> <safeluck.drive.evaluation.customview.CircleImageView style="@style/home_fragment_icon" android:src="@drawable/wheel" /> <TextView style="@style/home_fragment_text_sub" android:text="@string/vehicle_train" /> </LinearLayout> <LinearLayout android:layout_width="100dp" android:layout_height="100dp" android:gravity="center" android:id="@+id/system_setting" android:layout_weight="1" android:orientation="vertical"> <safeluck.drive.evaluation.customview.CircleImageView android:src="@drawable/setting" style="@style/home_fragment_icon"/> <TextView style="@style/home_fragment_text_sub" android:text="@string/setting" /> </LinearLayout> <LinearLayout android:layout_width="100dp" android:layout_height="100dp" android:gravity="center" android:id="@+id/exit_sys" android:layout_weight="1" android:orientation="vertical"> <safeluck.drive.evaluation.customview.CircleImageView android:src="@drawable/exit" style="@style/home_fragment_icon"/> <TextView style="@style/home_fragment_text_sub" android:text="@string/exit" /> </LinearLayout> </LinearLayout> <TextView style="@style/home_fragment_text" android:text="@string/version_name" app/src/main/res/layout/layout_score_item.xml
@@ -2,7 +2,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="40dp" android:background="@color/train_bg" android:background="@drawable/stu_score_title" > <TextView android:layout_width="0dp" @@ -14,7 +14,7 @@ android:text="扣分项目"/> <View android:layout_height="match_parent" android:layout_width="1px" android:background="#66CCFF" android:background="#2B3141" /> <TextView @@ -27,7 +27,7 @@ android:text="扣分分数"/> <View android:layout_height="match_parent" android:layout_width="1px" android:background="#66CCFF" android:background="#2B3141" /> <TextView app/src/main/res/layout/layout_stu_score.xml
@@ -2,7 +2,8 @@ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> android:layout_height="match_parent" android:background="@drawable/stu_score_bg"> <ListView android:layout_width="match_parent" android:layout_height="match_parent" app/src/main/res/layout/layout_sys_home_part.xml
@@ -1,10 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="center" android:background="@drawable/sys_home_part_bg" xmlns:app="http://schemas.android.com/apk/res-auto"> android:orientation="vertical" android:layout_width="280dp" android:gravity="center" android:layout_height="122dp" > <safeluck.drive.evaluation.customview.CircleImageView style="@style/home_fragment_icon" app/src/main/res/layout/layout_sys_home_part_exit.xml
New file @@ -0,0 +1,46 @@ <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="280dp" android:gravity="center" android:layout_height="122dp" > <safeluck.drive.evaluation.customview.CircleImageView style="@style/home_fragment_icon" android:id="@+id/circle_1" android:src="@drawable/exit" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="退出" android:textColor="#ffffffff" android:textSize="22sp" android:id="@+id/tv_des" android:layout_toRightOf="@+id/circle_1" /> <View android:layout_width="16dp" android:layout_height="2dp" android:background="@drawable/sys_line_bg" android:layout_below="@+id/tv_des" android:layout_toRightOf="@+id/circle_1" android:layout_marginTop="10dp" android:id="@+id/view_line" android:layout_marginBottom="10dp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="tui chu" android:textColor="#ff64738e" android:id="@+id/tv_des_t" android:textSize="8sp" android:shadowDx="0" android:shadowDy="1" android:shadowRadius="3.0" android:shadowColor="#ff181a26" android:layout_below="@+id/view_line" android:layout_toRightOf="@id/circle_1" /> </RelativeLayout> app/src/main/res/layout/layout_sys_home_part_set.xml
New file @@ -0,0 +1,46 @@ <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="280dp" android:gravity="center" android:layout_height="122dp" > <safeluck.drive.evaluation.customview.CircleImageView style="@style/home_fragment_icon" android:id="@+id/circle_1" android:src="@drawable/setting" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="设置" android:textColor="#ffffffff" android:textSize="22sp" android:id="@+id/tv_des" android:layout_toRightOf="@+id/circle_1" /> <View android:layout_width="16dp" android:layout_height="2dp" android:background="@drawable/sys_line_bg" android:layout_below="@+id/tv_des" android:layout_toRightOf="@+id/circle_1" android:layout_marginTop="10dp" android:id="@+id/view_line" android:layout_marginBottom="10dp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="she zhi" android:textColor="#ff64738e" android:id="@+id/tv_des_t" android:textSize="8sp" android:shadowDx="0" android:shadowDy="1" android:shadowRadius="3.0" android:shadowColor="#ff181a26" android:layout_below="@+id/view_line" android:layout_toRightOf="@id/circle_1" /> </RelativeLayout> app/src/main/res/layout/layout_sys_home_part_train.xml
New file @@ -0,0 +1,46 @@ <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="280dp" android:gravity="center" android:layout_height="122dp" > <safeluck.drive.evaluation.customview.CircleImageView style="@style/home_fragment_icon" android:id="@+id/circle_1" android:src="@drawable/wheel" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="单机训练" android:textColor="#ffffffff" android:textSize="22sp" android:id="@+id/tv_des" android:layout_toRightOf="@+id/circle_1" /> <View android:layout_width="16dp" android:layout_height="2dp" android:background="@drawable/sys_line_bg" android:layout_below="@+id/tv_des" android:layout_toRightOf="@+id/circle_1" android:layout_marginTop="10dp" android:id="@+id/view_line" android:layout_marginBottom="10dp"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="dan ji xun lian" android:textColor="#ff64738e" android:id="@+id/tv_des_t" android:textSize="8sp" android:shadowDx="0" android:shadowDy="1" android:shadowRadius="3.0" android:shadowColor="#ff181a26" android:layout_below="@+id/view_line" android:layout_toRightOf="@id/circle_1" /> </RelativeLayout> app/src/main/res/layout/layout_test.xml
@@ -7,9 +7,13 @@ android:layout_width="280dp" android:layout_height="122dp" android:background="@drawable/sys_home_part_bg" android:gravity="center_vertical|center_horizontal" > <include layout="@layout/layout_sys_home_part"/> <include android:layout_width="280dp" android:layout_height="122dp" android:layout_centerInParent="true" layout="@layout/layout_sys_home_part"/> </RelativeLayout> </LinearLayout> app/src/main/res/layout/layout_train_fragment.xml
@@ -3,6 +3,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" style="@style/ui_margin" > <include layout="@layout/networktoolbar"/> <LinearLayout app/src/main/res/layout/networktoolbar.xml
@@ -11,7 +11,6 @@ android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="@dimen/actionbarsizehalf" android:background="?attr/colorPrimary" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" app:popupTheme="@style/AppTheme.NoActionBar.PopupOverlay" app:titleTextAppearance="@style/Toolbar_TextAppearance_White"> app/src/main/res/layout/profile_layout.xml
@@ -2,7 +2,6 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/profile_bg" android:gravity="center" android:orientation="horizontal" android:padding="5dp"> @@ -12,9 +11,9 @@ android:layout_width="0dp" android:layout_height="90dp" android:layout_weight="1" android:scaleType="center" android:scaleType="fitCenter" android:src="@drawable/head_select" /> android:src="@drawable/head_select1" /> <LinearLayout android:layout_width="0dp" @@ -35,6 +34,7 @@ android:layout_height="wrap_content" android:layout_toRightOf="@+id/iv_head" android:layout_weight="1" android:textSize="9sp" android:text="@string/name" android:textColor="@android:color/white" /> @@ -63,6 +63,7 @@ android:layout_marginRight="10dp" android:layout_toRightOf="@+id/tv_name" android:layout_weight="1" android:textSize="9sp" android:text="@string/sex" android:textColor="@android:color/white" /> @@ -92,6 +93,7 @@ android:layout_below="@+id/tv_name" android:layout_weight="2" android:text="@string/user_id" android:textSize="9sp" android:textColor="@android:color/white" /> </LinearLayout> @@ -107,6 +109,7 @@ android:layout_height="wrap_content" android:layout_weight="1" android:text="@string/begin_time" android:textSize="9sp" android:textColor="@android:color/white" /> app/src/main/res/values/colors.xml
@@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <color name="colorPrimary">#008577</color> <color name="colorPrimary">#181B2A</color> <color name="colorPrimaryDark">#00574B</color> <color name="colorAccent">#D81B60</color> app/src/main/res/values/dimens.xml
@@ -1,5 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <dimen name="bottombar_height">0dp</dimen> <dimen name="actionbarsizehalf">28dp</dimen> <dimen name="actionbarsizehalf">20dp</dimen> <dimen name="network_train_textsize">9sp</dimen> <dimen name="ui_margin_10dp">10dp</dimen> </resources> app/src/main/res/values/styles.xml
@@ -56,5 +56,11 @@ <style name="Dialog.FullScreen" parent="Theme.AppCompat.Dialog"> <item name="android:padding">0dp</item> <item name="android:windowBackground">@android:color/transparent</item> </style> <style name="ui_margin"> <item name="android:layout_marginLeft">@dimen/ui_margin_10dp</item> <item name="android:layout_marginRight">@dimen/ui_margin_10dp</item> </style> </resources> lib/src/main/cpp/native-lib.cpp
@@ -26,7 +26,7 @@ const int RTK_PLATFORM_PORT = 12125; const uint8_t phone[] = {0x20,0x19,0x10,0x15,0x00,0x00,0x00,0x01}; const char *VIRTUAL_RTK_IP = "192.168.16.100"; const char *VIRTUAL_RTK_IP = "192.168.16.106"; const int VIRTUAL_RTK_PORT = 9001; static pthread_mutex_t tts_mutex = PTHREAD_MUTEX_INITIALIZER;