endian11
2019-09-11 1b112103b7f53225f58a2956ac6ceabf2e212c41
动态设置场地5大考试项目;
3个文件已修改
16 ■■■■ 已修改文件
app/src/main/java/safeluck/drive/evaluation/customview/HouseView.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/layout_net_train_item.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values/attrs.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/safeluck/drive/evaluation/customview/HouseView.java
@@ -1,6 +1,7 @@
package safeluck.drive.evaluation.customview;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
@@ -12,6 +13,7 @@
import android.util.TypedValue;
import android.view.View;
import safeluck.drive.evaluation.R;
import safeluck.drive.evaluation.util.Utils;
/**
@@ -27,20 +29,23 @@
    private float PADDING = Utils.px2dp(40);
    private double a = Math.toRadians(55.0);
    private int color = Color.parseColor("#99C3D1");
    private String text = "倒车入库";
    private String text ;
    public HouseView(Context context) {
        super(context);
        this(context,null);
    }
    public HouseView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.ArrowView,defStyleAttr,0);
        text = typedArray.getString(R.styleable.ArrowView_text);
        typedArray.recycle();
    }
    public HouseView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        this(context, attrs,0);
    }
    @Override
app/src/main/res/layout/layout_net_train_item.xml
@@ -12,6 +12,7 @@
    android:layout_width="80dp"
    android:layout_height="80dp"
    android:id="@+id/hv"
    app:text = "倒车入库"
    />
    <safeluck.drive.evaluation.customview.ArrowView
app/src/main/res/values/attrs.xml
@@ -10,4 +10,8 @@
        <attr name="text" format="string" />
    </declare-styleable>
    <declare-styleable name="HouseView">
        <attr name="item" format="string" />
    </declare-styleable>
</resources>