How to implement ConstraintLayout in NestedScrollView

后端 未结 4 1336
[愿得一人]
[愿得一人] 2021-02-08 18:27

ConstraintLayout is behaving inconsistently if a TextView has very fewer texts than other TextView wrapped in horizontal LinearLayout. If a character in left TextView

相关标签:
4条回答
  • 2021-02-08 18:45

    There are some bugs regarding wrap_content in constraintLayout version 1.0.2 as per google developer whom I talked. He suggested to use 1.1.0-beta4 version and by using version 1.1.0-beta4 my issue has been fixed.

    0 讨论(0)
  • 2021-02-08 18:47
    <?xml version="1.0" encoding="utf-8"?>
    <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
                                                xmlns:app="http://schemas.android.com/apk/res-auto"
                                                xmlns:tools="http://schemas.android.com/tools"
                                                android:layout_width="match_parent"
                                                android:layout_height="match_parent"
                                                android:background="#F1F1F1"
                                                 >
    
    <android.support.v4.widget.NestedScrollView
                    android:id="@+id/NestedScrollView"
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    app:layout_constraintBottom_toTopOf="@+id/bt_back"
                    app:layout_constraintRight_toRightOf="parent"
                    app:layout_constraintLeft_toLeftOf="parent"
                    app:layout_constraintTop_toTopOf="parent">
    
        <android.support.constraint.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#ffffff"
            android:layout_margin = "10dp">
    
            <TextView
                android:id="@+id/tv_name_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="employee_name"
                android:textColor="#999999"
                android:textSize="12sp"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintBottom_toTopOf="@+id/tv_name"
                />
    
            <TextView
                android:id="@+id/tv_date_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="date_header"
                android:textColor="#999999"
                android:textSize="12sp"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintLeft_toRightOf="@+id/tv_name_header"
                app:layout_constraintBottom_toTopOf="@+id/tv_date"/>
    
    
            <TextView
                android:id="@+id/tv_name"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="name"
                android:textColor="#000000"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_name_header"
                app:layout_constraintBottom_toTopOf="@+id/tv_role_header"
                />
    
            <TextView
                android:id="@+id/tv_date"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="date"
                android:textColor="#000000"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintTop_toBottomOf="@+id/tv_date_header"
                app:layout_constraintLeft_toLeftOf="@+id/tv_date_header"
                app:layout_constraintBottom_toTopOf="@+id/tv_band_header"
                />
    
            <TextView
                android:id="@+id/tv_role_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:text="employee_role"
                android:textColor="#999999"
                android:textSize="12sp"
                app:layout_constraintLeft_toLeftOf="@+id/tv_name"
                app:layout_constraintTop_toBottomOf="@+id/tv_name" />
    
            <TextView
                android:id="@+id/tv_band_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="11dp"
                android:text="employee_band"
                android:textColor="#999999"
                android:textSize="12sp"
                app:layout_constraintLeft_toLeftOf="@+id/tv_date"
                app:layout_constraintTop_toBottomOf="@+id/tv_date"
                />
    
    
            <TextView
                android:id="@+id/tv_role"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="role"
                android:textColor="#000000"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintLeft_toLeftOf="@+id/tv_role_header"
                app:layout_constraintTop_toBottomOf="@+id/tv_role_header" />
    
            <TextView
                android:id="@+id/tv_band"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="band"
                android:textColor="#000000"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintLeft_toLeftOf="@+id/tv_band_header"
                app:layout_constraintTop_toBottomOf="@+id/tv_band_header" />
    
            <View
                android:id="@+id/view_divider"
                android:layout_width="0dp"
                android:layout_height="1dp"
                android:layout_marginTop="15dp"
                android:background="#E1E4EA"
                app:layout_constraintTop_toBottomOf="@+id/tv_role"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintLeft_toLeftOf="parent"/>
    
            <LinearLayout
                android:id="@+id/ll_address"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="15dp"
                android:orientation="horizontal"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/view_divider">
                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:orientation="horizontal">
                    <TextView
                        android:layout_width="15dp"
                        android:layout_height="15dp"
                        android:layout_marginTop="3dp"
                        />
    
                    <TextView
                        android:id="@+id/tv_origin_address"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="5dp"
                        android:layout_marginRight="5dp"
                        android:text="origin_address \n origin_address"
                        android:textColor="#000000"
                        android:textSize="13sp" />
                </LinearLayout>
                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:gravity="right"
                    android:orientation="horizontal">
    
                    <TextView
                        android:layout_width="15dp"
                        android:layout_height="15dp"
                        android:layout_marginLeft="5dp"
                        android:layout_marginTop="3dp"
                        />
    
                    <TextView
                        android:id="@+id/tv_destination_address"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginRight="5dp"
                        android:gravity="right"
                        android:text="destination_address \n destination_address \n destination_address \n destination_address \n destination_address \n destination_address \n destination_address \n destination_address \n destination_address \n destination_address \n destination_address \n destination_address \n destination_address \n destination_address \n destination_address \n destination_address "
                        android:textColor="#000000"
                        android:textSize="13sp" />
                </LinearLayout>
            </LinearLayout>
    
            <TextView
                android:id="@+id/tv_justification_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:text="justification_header"
                android:textColor="#999999"
                android:textSize="12sp"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/ll_address" />
    
    
            <TextView
                android:id="@+id/tv_justification"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="justification"
                android:textColor="#000000"
                android:textSize="14sp"
                app:layout_constraintLeft_toLeftOf="@+id/tv_justification_header"
                app:layout_constraintTop_toBottomOf="@+id/tv_justification_header" />
    
            <TextView
                android:id="@+id/tv_vehicle_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:text="vehicle_type"
                android:textColor="#999999"
                android:textSize="12sp"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_justification" />
    
            <TextView
                android:id="@+id/tv_vehicle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="vehicle"
                android:textColor="#000000"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_vehicle_header" />
    
            <TextView
                android:id="@+id/tv_Duration_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:text="distance"
                android:textColor="#999999"
                android:textSize="12sp"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_justification" />
    
            <TextView
                android:id="@+id/tv_duration"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="duration"
                android:textColor="#000000"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_Duration_header" />
    
            <TextView
                android:id="@+id/tv_start_time_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:text="start_time"
                android:textColor="#999999"
                android:textSize="12sp"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_vehicle" />
    
            <TextView
                android:id="@+id/tv_end_time_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:text="end_time"
                android:textColor="#999999"
                android:textSize="12sp"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_duration" />
    
    
            <TextView
                android:id="@+id/tv_start_time"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="start_time"
                android:textColor="#000000"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_start_time_header" />
    
            <TextView
                android:id="@+id/tv_end_time"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="end_time"
                android:textColor="#000000"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_end_time_header" />
    
            <TextView
                android:id="@+id/tv_distance_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:text="trip_distance"
                android:textColor="#999999"
                android:textSize="12sp"
                app:layout_constraintTop_toBottomOf="@+id/tv_start_time"
                app:layout_constraintLeft_toLeftOf="parent"/>
    
            <TextView
                android:id="@+id/tv_edited_distance_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="edited_distance"
                android:textColor="#999999"
                android:textSize="12sp"
                android:visibility="gone"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_end_time" />
    
            <TextView
                android:id="@+id/tv_distance"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="distance"
                android:textColor="#000000"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_distance_header" />
    
            <TextView
                android:id="@+id/tv_edited_distance"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="edited_distance"
                android:textColor="#D15900"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_edited_distance_header" />
    
            <TextView
                android:id="@+id/tv_edit_reason"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="14sp"
                android:text="edit_reason"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_distance" />
    
            <LinearLayout
                android:id="@+id/ll_reject_reason"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_edit_reason"
                app:layout_constraintBottom_toBottomOf="parent"
                android:layout_marginBottom="10dp">
    
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="manager_reject_reason"
                    android:textColor="#999999"
                    android:textSize="12sp" />
    
    
                <TextView
                    android:id="@+id/tv_rejection_reason"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="rejection_reason"
                    android:textColor="#000000"
                    android:textSize="14sp" />
    
            </LinearLayout>
        </android.support.constraint.ConstraintLayout>
    </android.support.v4.widget.NestedScrollView>
        <Button
            android:id="@+id/bt_back"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:gravity="center"
            android:text="Back"
            android:textAllCaps="true"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/NestedScrollView"
            app:layout_constraintBottom_toBottomOf="parent"
            android:layout_marginLeft="12dp"
            android:layout_marginBottom="10dp"
            android:layout_marginStart="12dp"/>
    </android.support.constraint.ConstraintLayout>
    
    0 讨论(0)
  • 2021-02-08 18:59

    You need to add constraint bottom to your button,something like this

        <Button
            android:id="@+id/bt_back"
            android:layout_width="wrap_content"
            android:layout_height="35dp"
    
            android:gravity="left|center_vertical"
            android:paddingLeft="0dp"
            android:text="back"
            android:textAllCaps="true"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintTop_toBottomOf="@id/ll_reject_reason"
            app:layout_constraintVertical_bias="0.0" />
    
    0 讨论(0)
  • 2021-02-08 19:08
    <?xml version="1.0" encoding="utf-8"?>
    <android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
                                                xmlns:app="http://schemas.android.com/apk/res-auto"
                                                xmlns:tools="http://schemas.android.com/tools"
                                                android:layout_width="match_parent"
                                                android:layout_height="match_parent"
                                                android:background="#F1F1F1">
    
        <android.support.constraint.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#ffffff"
            android:layout_margin = "10dp">
    
            <TextView
                android:id="@+id/tv_name_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="employee_name"
                android:textColor="#999999"
                android:textSize="12sp"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintBottom_toTopOf="@+id/tv_name"
                />
    
            <TextView
                android:id="@+id/tv_date_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="date_header"
                android:textColor="#999999"
                android:textSize="12sp"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintLeft_toRightOf="@+id/tv_name_header"
                app:layout_constraintBottom_toTopOf="@+id/tv_date"/>
    
    
            <TextView
                android:id="@+id/tv_name"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="name"
                android:textColor="#000000"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_name_header"
                app:layout_constraintBottom_toTopOf="@+id/tv_role_header"
                />
    
            <TextView
                android:id="@+id/tv_date"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="date"
                android:textColor="#000000"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintTop_toBottomOf="@+id/tv_date_header"
                app:layout_constraintLeft_toLeftOf="@+id/tv_date_header"
                app:layout_constraintBottom_toTopOf="@+id/tv_band_header"
                />
    
            <TextView
                android:id="@+id/tv_role_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:text="employee_role"
                android:textColor="#999999"
                android:textSize="12sp"
                app:layout_constraintLeft_toLeftOf="@+id/tv_name"
                app:layout_constraintTop_toBottomOf="@+id/tv_name" />
    
            <TextView
                android:id="@+id/tv_band_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="11dp"
                android:text="employee_band"
                android:textColor="#999999"
                android:textSize="12sp"
                app:layout_constraintLeft_toLeftOf="@+id/tv_date"
                app:layout_constraintTop_toBottomOf="@+id/tv_date"
                />
    
    
            <TextView
                android:id="@+id/tv_role"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="role"
                android:textColor="#000000"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintLeft_toLeftOf="@+id/tv_role_header"
                app:layout_constraintTop_toBottomOf="@+id/tv_role_header" />
    
            <TextView
                android:id="@+id/tv_band"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="band"
                android:textColor="#000000"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintLeft_toLeftOf="@+id/tv_band_header"
                app:layout_constraintTop_toBottomOf="@+id/tv_band_header" />
    
            <View
                android:id="@+id/view_divider"
                android:layout_width="0dp"
                android:layout_height="1dp"
                android:layout_marginTop="15dp"
                android:background="#E1E4EA"
                app:layout_constraintTop_toBottomOf="@+id/tv_role"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintLeft_toLeftOf="parent"/>
    
            <LinearLayout
                android:id="@+id/ll_address"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="15dp"
                android:orientation="horizontal"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/view_divider">
                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:orientation="horizontal">
                    <TextView
                        android:layout_width="15dp"
                        android:layout_height="15dp"
                        android:layout_marginTop="3dp"
                        />
    
                    <TextView
                        android:id="@+id/tv_origin_address"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="5dp"
                        android:layout_marginRight="5dp"
                        android:text="origin_address \n origin_address"
                        android:textColor="#000000"
                        android:textSize="13sp" />
                </LinearLayout>
                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:gravity="right"
                    android:orientation="horizontal">
    
                    <TextView
                        android:layout_width="15dp"
                        android:layout_height="15dp"
                        android:layout_marginLeft="5dp"
                        android:layout_marginTop="3dp"
                        />
    
                    <TextView
                        android:id="@+id/tv_destination_address"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginRight="5dp"
                        android:gravity="right"
                        android:text="destination_address \n destination_address \n destination_address \n destination_address \n destination_address \n destination_address \n destination_address \n destination_address \n destination_address \n destination_address \n destination_address \n destination_address \n destination_address \n destination_address \n destination_address "
                        android:textColor="#000000"
                        android:textSize="13sp" />
                </LinearLayout>
            </LinearLayout>
    
            <TextView
                android:id="@+id/tv_justification_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:text="justification_header"
                android:textColor="#999999"
                android:textSize="12sp"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/ll_address" />
    
    
            <TextView
                android:id="@+id/tv_justification"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="justification"
                android:textColor="#000000"
                android:textSize="14sp"
                app:layout_constraintLeft_toLeftOf="@+id/tv_justification_header"
                app:layout_constraintTop_toBottomOf="@+id/tv_justification_header" />
    
            <TextView
                android:id="@+id/tv_vehicle_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:text="vehicle_type"
                android:textColor="#999999"
                android:textSize="12sp"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_justification" />
    
            <TextView
                android:id="@+id/tv_vehicle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="vehicle"
                android:textColor="#000000"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_vehicle_header" />
    
            <TextView
                android:id="@+id/tv_Duration_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:text="distance"
                android:textColor="#999999"
                android:textSize="12sp"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_justification" />
    
            <TextView
                android:id="@+id/tv_duration"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="duration"
                android:textColor="#000000"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_Duration_header" />
    
            <TextView
                android:id="@+id/tv_start_time_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:text="start_time"
                android:textColor="#999999"
                android:textSize="12sp"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_vehicle" />
    
            <TextView
                android:id="@+id/tv_end_time_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:text="end_time"
                android:textColor="#999999"
                android:textSize="12sp"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_duration" />
    
    
            <TextView
                android:id="@+id/tv_start_time"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="start_time"
                android:textColor="#000000"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_start_time_header" />
    
            <TextView
                android:id="@+id/tv_end_time"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="end_time"
                android:textColor="#000000"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_end_time_header" />
    
            <TextView
                android:id="@+id/tv_distance_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:text="trip_distance"
                android:textColor="#999999"
                android:textSize="12sp"
                app:layout_constraintTop_toBottomOf="@+id/tv_start_time"
                app:layout_constraintLeft_toLeftOf="parent"/>
    
            <TextView
                android:id="@+id/tv_edited_distance_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="edited_distance"
                android:textColor="#999999"
                android:textSize="12sp"
                android:visibility="gone"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_end_time" />
    
            <TextView
                android:id="@+id/tv_distance"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="distance"
                android:textColor="#000000"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_distance_header" />
    
            <TextView
                android:id="@+id/tv_edited_distance"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="edited_distance"
                android:textColor="#D15900"
                android:textSize="14sp"
                android:textStyle="bold"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_edited_distance_header" />
    
            <TextView
                android:id="@+id/tv_edit_reason"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="14sp"
                android:text="edit_reason"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_distance" />
    
            <LinearLayout
                android:id="@+id/ll_reject_reason"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/tv_edit_reason">
    
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="10dp"
                    android:text="manager_reject_reason"
                    android:textColor="#999999"
                    android:textSize="12sp" />
    
    
                <TextView
                    android:id="@+id/tv_rejection_reason"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="rejection_reason"
                    android:textColor="#000000"
                    android:textSize="14sp" />
    
            </LinearLayout>
    
            <Button
                android:id="@+id/bt_back"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="14dp"
                android:gravity="center"
                android:text="Back"
                android:textAllCaps="true"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/ll_reject_reason"
                app:layout_constraintBottom_toBottomOf="parent"
                android:layout_marginLeft="12dp"
                android:layout_marginBottom="14dp"
                android:layout_marginStart="12dp"/>
    
        </android.support.constraint.ConstraintLayout>
    </android.support.v4.widget.NestedScrollView>
    
    0 讨论(0)
提交回复
热议问题