From 83f2f00750381bbb6448908598c6e39aa080a100 Mon Sep 17 00:00:00 2001
From: endian11 <Dana_Lee1016@126.com>
Date: 星期四, 24 九月 2020 16:46:18 +0800
Subject: [PATCH] 完成通用评判设置
---
app/src/main/java/safeluck/drive/evaluation/fragment/rulefragments/cview/TextCheckBox.java | 53 +++++++++++++++++
app/src/main/res/layout/fragment_content.xml | 24 ++++---
app/src/main/res/layout/layout_common_judge.xml | 98 ++++++++++++++++++++++++++++++++
app/src/main/res/values/dimens.xml | 1
4 files changed, 166 insertions(+), 10 deletions(-)
diff --git a/app/src/main/java/safeluck/drive/evaluation/fragment/rulefragments/cview/TextCheckBox.java b/app/src/main/java/safeluck/drive/evaluation/fragment/rulefragments/cview/TextCheckBox.java
new file mode 100644
index 0000000..782b198
--- /dev/null
+++ b/app/src/main/java/safeluck/drive/evaluation/fragment/rulefragments/cview/TextCheckBox.java
@@ -0,0 +1,53 @@
+package safeluck.drive.evaluation.fragment.rulefragments.cview;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.CheckBox;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import safeluck.drive.evaluation.R;
+
+/**
+ * DriveJudge
+ * Created by lzw on 2020/9/24. 10:25:00
+ * 閭锛�632393724@qq.com
+ * All Rights Saved! Chongqing AnYun Tech co. LTD
+ */
+public class TextCheckBox extends LinearLayout {
+
+ private CheckBox checkBox;
+ public TextCheckBox(Context context) {
+ this(context,null);
+ }
+
+ public TextCheckBox(Context context, AttributeSet attrs) {
+ this(context, attrs,0);
+ }
+
+ public TextCheckBox(Context context, AttributeSet attrs, int defStyleAttr) {
+ this(context, attrs, defStyleAttr,0);
+ }
+
+ public TextCheckBox(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
+ super(context, attrs, defStyleAttr, defStyleRes);
+ initView(context,attrs);
+ }
+
+ private void initView(Context context, AttributeSet attrs) {
+ View view = LayoutInflater.from(context).inflate(R.layout.layout_text_checkbox,this,true);
+ TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.TextCheckBox_attr_tvcheck);
+ String string = typedArray.getString(R.styleable.TextCheckBox_attr_tvcheck_txt_des_check);
+ boolean aBoolean = typedArray.getBoolean(R.styleable.TextCheckBox_attr_tvcheck_check_not, false);
+
+ TextView text = view.findViewById(R.id.tv_checkbox);
+ text.setText(string);
+ checkBox = view.findViewById(R.id.check_setting);
+
+ checkBox.setChecked(aBoolean);
+ }
+
+}
diff --git a/app/src/main/res/layout/fragment_content.xml b/app/src/main/res/layout/fragment_content.xml
index d536773..d059495 100644
--- a/app/src/main/res/layout/fragment_content.xml
+++ b/app/src/main/res/layout/fragment_content.xml
@@ -6,7 +6,8 @@
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1"
android:id="@+id/fl_content_container"/>
<!-- <TextView
android:id="@+id/tv_content"
@@ -18,15 +19,18 @@
android:text="CyclerFragment1"
android:textSize="26sp"/>
-
+-->
<Button
- android:id="@+id/btn_next"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="16dp"
- android:layout_marginRight="16dp"
- android:layout_marginTop="32dp"
- android:textAllCaps="false"
- android:text="start_cycler"/>-->
+ android:id="@+id/btn_next"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="16dp"
+ android:layout_marginRight="16dp"
+ android:layout_marginTop="32dp"
+ android:background="@drawable/route_item_select_bg"
+ android:textAllCaps="false"
+ android:textColor="@android:color/white"
+ android:textSize="@dimen/network_train_textsize32px"
+ android:text="淇濆瓨"/>
</LinearLayout>
diff --git a/app/src/main/res/layout/layout_common_judge.xml b/app/src/main/res/layout/layout_common_judge.xml
new file mode 100644
index 0000000..c0480f2
--- /dev/null
+++ b/app/src/main/res/layout/layout_common_judge.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ScrollView xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
+ android:layout_height="match_parent">
+<LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+ <safeluck.drive.evaluation.fragment.rulefragments.cview.TextEditText
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:txt_des_tvedit = "璧锋鍙戝姩鏈烘渶楂樿浆閫�"
+ app:et_input="2500"
+ />
+ <safeluck.drive.evaluation.fragment.rulefragments.cview.TextCheckBox
+ android:layout_width="match_parent"
+ android:layout_height="50dp"
+ app:txt_des_check = "鍙湪璧锋椤圭洰鏃舵鏌ュ彂鍔ㄦ満杞�熼珮"/>
+ <safeluck.drive.evaluation.fragment.rulefragments.cview.TextEditText
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:txt_des_tvedit = "鍏ㄧ▼闄愬埗鏈�楂橀�熷害"
+ app:et_input="48"
+ /> <safeluck.drive.evaluation.fragment.rulefragments.cview.TextEditText
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:txt_des_tvedit = "鍏ㄧ▼蹇呴』杈惧埌鎸囧畾閫熷害"
+ app:et_input="20"
+ /><safeluck.drive.evaluation.fragment.rulefragments.cview.TextEditText
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:txt_des_tvedit = "鍏ㄧ▼蹇呴』杈惧埌鎸囧畾閫熷害閲岀▼/绫�"
+ app:et_input="20"
+ />
+ <safeluck.drive.evaluation.fragment.rulefragments.cview.TextCheckBox
+ android:layout_width="match_parent"
+ android:layout_height="50dp"
+ app:txt_des_check = "蹇呴』杩炵画杈惧埌鎸囧畾閫熷害"/>
+ <safeluck.drive.evaluation.fragment.rulefragments.cview.TextEditText
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:txt_des_tvedit = "鍏ㄧ▼蹇呴』杈惧埌鎸囧畾妗d綅"
+ app:et_input="4"
+ />
+ <safeluck.drive.evaluation.fragment.rulefragments.cview.TextEditText
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:txt_des_tvedit = "鍏ㄧ▼蹇呴』杈惧埌鎸囧畾妗d綅閲岀▼/绫�"
+ app:et_input="4"
+ />
+ <safeluck.drive.evaluation.fragment.rulefragments.cview.TextEditText
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:txt_des_tvedit = "鍏ㄧ▼蹇呴』杈惧埌鎸囧畾妗d綅鏃堕棿/绉�"
+ app:et_input="2"
+ />
+ <safeluck.drive.evaluation.fragment.rulefragments.cview.TextCheckBox
+ android:layout_width="match_parent"
+ android:layout_height="50dp"
+ app:check_not = "true"
+ app:txt_des_check = "蹇呴』杩炵画杈惧埌鎸囧畾妗d綅"/>
+ <safeluck.drive.evaluation.fragment.rulefragments.cview.TextEditText
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:txt_des_tvedit = "璧锋鎴栧仠杞︽椂绂诲悎浣跨敤鏃堕棿/绉�"
+ app:et_input="2"
+ />
+ <safeluck.drive.evaluation.fragment.rulefragments.cview.TextEditText
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:txt_des_tvedit = "绂诲悎琛岄┒鏃舵渶闀夸娇鐢ㄦ椂闂�/绉�"
+ app:et_input="2"
+ />
+ <safeluck.drive.evaluation.fragment.rulefragments.cview.TextEditText
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:txt_des_tvedit = "绂诲悎琛岄┒鏃舵渶闀夸娇鐢ㄨ窛绂�/绫�"
+ app:et_input="2"
+ />
+ <safeluck.drive.evaluation.fragment.rulefragments.cview.TextEditText
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:txt_des_tvedit = "鍏佽绌烘尅婊戣/绉�"
+ app:et_input="3"
+ />
+ <safeluck.drive.evaluation.fragment.rulefragments.cview.TextEditText
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:txt_des_tvedit = "杩炵画鍙樻洿杞﹂亾涓棿闂撮殧鏃堕棿/绉�"
+ app:et_input="5"
+ />
+ <safeluck.drive.evaluation.fragment.rulefragments.cview.TextCheckBox
+ android:layout_width="match_parent"
+ android:layout_height="50dp"
+ app:check_not = "false"
+ app:txt_des_check = "璇勫垽鍏氦杞︾珯銆佸鏍″尯鍩熻矾鍙g洿琛屻�佷繚鎸佹墽琛屻�佷細杞︾瓑椤圭洰绂佹浣跨敤杞悜鐏�"/>
+</LinearLayout>
+</ScrollView>
\ No newline at end of file
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index 321c02e..b31872a 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -34,5 +34,6 @@
<dimen name="dialog_item_image_height_width">60dp</dimen>
<dimen name="ui_margin_60dp">60dp</dimen>
+ <dimen name="network_train_textsize32px">22sp</dimen>
</resources>
\ No newline at end of file
--
Gitblit v1.8.0