app/src/main/java/safeluck/drive/evaluation/fragment/rulefragments/cview/TextCheckBox.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/res/layout/fragment_content.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/res/layout/layout_common_judge.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/res/values/dimens.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
app/src/main/java/safeluck/drive/evaluation/fragment/rulefragments/cview/TextCheckBox.java
New file @@ -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); } } 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> app/src/main/res/layout/layout_common_judge.xml
New file @@ -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 = "全程必须达到指定档位" 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 = "全程必须达到指定档位里程/米" 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 = "全程必须达到指定档位时间/秒" 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 = "必须连续达到指定档位"/> <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 = "评判公交车站、学校区域路口直行、保持执行、会车等项目禁止使用转向灯"/> </LinearLayout> </ScrollView> 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>