[add] 方向盘UI,缺少业务逻辑
This commit is contained in:
@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.hmi.ui.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -16,20 +17,11 @@ import com.mogo.eagle.core.function.hmi.R;
|
||||
* @since: 4/7/22
|
||||
*/
|
||||
public class SteeringWheelView extends ConstraintLayout {
|
||||
public SteeringWheelView(@NonNull Context context) {
|
||||
super(context);
|
||||
LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel, this);
|
||||
}
|
||||
private static final String TAG = "SteeringWheelView";
|
||||
|
||||
public SteeringWheelView(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public SteeringWheelView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
public SteeringWheelView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel, this);
|
||||
Log.d(TAG, "2");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.hmi.ui.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
@@ -17,25 +18,16 @@ import com.mogo.eagle.core.function.hmi.R;
|
||||
* @since: 4/7/22
|
||||
*/
|
||||
public class TapPositionView extends ConstraintLayout {
|
||||
private static final String TAG = "TapPositionView";
|
||||
private TextView tabP;
|
||||
private TextView tabR;
|
||||
private TextView tabN;
|
||||
private TextView tabD;
|
||||
|
||||
public TapPositionView(Context context) {
|
||||
super(context);
|
||||
LayoutInflater.from(context).inflate(R.layout.hmi_tap_position, this);
|
||||
}
|
||||
|
||||
public TapPositionView(Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
Log.d(TAG, "2");
|
||||
LayoutInflater.from(context).inflate(R.layout.hmi_tap_position, this);
|
||||
|
||||
public TapPositionView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
public TapPositionView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 9.6 KiB |
@@ -1,18 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="@dimen/dp_300"
|
||||
android:layout_height="@dimen/dp_300"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_steering_wheel">
|
||||
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/blue_circle"
|
||||
android:layout_width="@dimen/dp_180"
|
||||
android:layout_height="@dimen/dp_180"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp_34"
|
||||
android:indeterminateDrawable="@drawable/bg_steering_outer" />
|
||||
android:layout_marginLeft="@dimen/dp_60"
|
||||
android:layout_marginTop="@dimen/dp_38"
|
||||
android:layout_marginRight="@dimen/dp_60"
|
||||
android:indeterminateDrawable="@drawable/bg_steering_outer"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:gravity="right"
|
||||
android:text="18°"
|
||||
android:textColor="#415479"
|
||||
android:textSize="@dimen/dp_26"
|
||||
app:layout_constraintRight_toLeftOf="@+id/blue_circle"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.CircularProgressView
|
||||
android:layout_width="@dimen/dp_190"
|
||||
@@ -20,27 +35,44 @@
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:progColor="@color/taxi_steering_wheel_color_selector"
|
||||
app:progWidth="8px"
|
||||
app:progress="0" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/module_och_autopilot_iv"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:id="@+id/autopilot_iv"
|
||||
android:layout_width="@dimen/dp_144"
|
||||
android:layout_height="@dimen/dp_144"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/dp_64"
|
||||
android:layout_marginTop="@dimen/dp_54"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/taxi_p_un_auto_nor" />
|
||||
android:src="@drawable/bg_auto_nor"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:src="@drawable/icon_in_steering"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/autopilot_iv"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/autopilot_iv"
|
||||
app:layout_constraintRight_toRightOf="@+id/autopilot_iv"
|
||||
app:layout_constraintTop_toTopOf="@+id/autopilot_iv" />
|
||||
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.TapPositionView
|
||||
android:id="@+id/tap_position"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="@dimen/dp_30"/>
|
||||
android:layout_width="@dimen/dp_240"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_30"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/blue_circle" />
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user