desc:时间设置
							parent
							
								
									4ba7d5d17c
								
							
						
					
					
						commit
						888ef2a590
					
				| @ -0,0 +1,6 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <shape xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     android:shape="rectangle"> | ||||
|     <solid android:color="@color/_202A45" /> | ||||
|     <corners android:radius="@dimen/_20dp" /> | ||||
| </shape> | ||||
| @ -0,0 +1,6 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <shape xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     android:shape="rectangle"> | ||||
| 
 | ||||
|     <solid android:color="#ffffffff" /> | ||||
| </shape> | ||||
| @ -1,7 +1,97 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     android:orientation="vertical" | ||||
|     xmlns:app="http://schemas.android.com/apk/res-auto" | ||||
|     android:layout_width="match_parent" | ||||
|     android:layout_height="match_parent"> | ||||
|     android:layout_height="match_parent" | ||||
|     android:gravity="center_horizontal" | ||||
|     android:orientation="vertical"> | ||||
| 
 | ||||
|     <androidx.constraintlayout.widget.ConstraintLayout | ||||
|         android:layout_width="@dimen/_960dp" | ||||
|         android:layout_height="@dimen/_580dp" | ||||
|         android:layout_marginTop="@dimen/_201dp" | ||||
|         android:background="@drawable/warn_setting_btn_bg"> | ||||
| 
 | ||||
|         <View | ||||
|             android:id="@+id/divider" | ||||
|             android:layout_width="@dimen/_6dp" | ||||
|             android:layout_height="@dimen/_28dp" | ||||
|             android:layout_marginStart="@dimen/_40dp" | ||||
|             android:background="@drawable/white_rectangle" | ||||
|             app:layout_constraintBottom_toTopOf="@id/tv_cancel" | ||||
|             app:layout_constraintStart_toStartOf="parent" | ||||
|             app:layout_constraintTop_toTopOf="parent" /> | ||||
| 
 | ||||
|         <TextView | ||||
|             android:id="@+id/tv_currentTime" | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginStart="@dimen/_6dp" | ||||
|             android:text="@string/current_time" | ||||
|             android:textColor="@color/white" | ||||
|             android:textSize="@dimen/_30dp" | ||||
|             app:layout_constraintBottom_toTopOf="@id/tv_cancel" | ||||
|             app:layout_constraintStart_toEndOf="@id/divider" | ||||
|             app:layout_constraintTop_toTopOf="parent" /> | ||||
| 
 | ||||
|         <TextView | ||||
|             android:id="@+id/tv_time" | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginTop="@dimen/_6dp" | ||||
|             android:text="2023.5.31" | ||||
|             android:textColor="@color/white" | ||||
|             android:textSize="@dimen/_30dp" | ||||
|             app:layout_constraintStart_toStartOf="@id/tv_currentTime" | ||||
|             app:layout_constraintTop_toBottomOf="@id/tv_currentTime" /> | ||||
| 
 | ||||
| 
 | ||||
|         <com.loper7.date_time_picker.DateTimePicker | ||||
|             android:id="@+id/picker" | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_centerVertical="true" | ||||
|             android:paddingHorizontal="@dimen/_40dp" | ||||
|             android:paddingVertical="@dimen/_66dp" | ||||
|             android:background="@drawable/datepicker_bg" | ||||
|             android:layout_marginEnd="@dimen/_40dp" | ||||
|             app:dt_dividerColor="#00000000" | ||||
|             app:dt_layout="@layout/layout_date_picker_globalization1" | ||||
|             app:dt_normalTextSize="@dimen/_28dp" | ||||
|             app:dt_selectTextSize="@dimen/_30dp" | ||||
|             app:dt_selectedTextBold="true" | ||||
|             app:dt_showLabel="true" | ||||
|             app:dt_textBold="true" | ||||
|             app:dt_textColor="@color/color_offline" | ||||
|             app:dt_themeColor="@color/white" | ||||
|             app:layout_constraintBottom_toTopOf="@id/tv_confirm" | ||||
|             app:layout_constraintEnd_toEndOf="parent" | ||||
|             app:layout_constraintTop_toTopOf="parent" /> | ||||
| 
 | ||||
|         <TextView | ||||
|             android:id="@+id/tv_cancel" | ||||
|             android:layout_width="@dimen/_480dp" | ||||
|             android:layout_height="@dimen/_81dp" | ||||
|             android:background="@drawable/cancel_btn_bg" | ||||
|             android:gravity="center" | ||||
|             android:text="@string/cancel" | ||||
|             android:textColor="@color/white_30" | ||||
|             android:textSize="@dimen/_36dp" | ||||
|             app:layout_constraintBottom_toBottomOf="parent" | ||||
|             app:layout_constraintStart_toStartOf="parent" /> | ||||
| 
 | ||||
|         <TextView | ||||
|             android:id="@+id/tv_confirm" | ||||
|             android:layout_width="@dimen/_480dp" | ||||
|             android:layout_height="@dimen/_81dp" | ||||
|             android:layout_alignParentEnd="true" | ||||
|             android:layout_alignParentBottom="true" | ||||
|             android:background="@drawable/confirm_btn_bg" | ||||
|             android:gravity="center" | ||||
|             android:text="@string/confirm" | ||||
|             android:textColor="@color/white" | ||||
|             android:textSize="@dimen/_36dp" | ||||
|             app:layout_constraintBottom_toBottomOf="parent" | ||||
|             app:layout_constraintEnd_toEndOf="parent" /> | ||||
|     </androidx.constraintlayout.widget.ConstraintLayout> | ||||
| </LinearLayout> | ||||
| @ -0,0 +1,75 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <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="wrap_content" | ||||
|     android:layout_height="wrap_content" | ||||
|     android:layout_gravity="center" | ||||
|     android:orientation="horizontal"> | ||||
| 
 | ||||
|     <com.loper7.date_time_picker.number_picker.NumberPicker | ||||
|         android:id="@+id/np_datetime_year" | ||||
|         android:layout_width="@dimen/_121dp" | ||||
|         android:layout_height="wrap_content" | ||||
|         app:layout_constraintBottom_toBottomOf="parent" | ||||
|         app:layout_constraintStart_toStartOf="parent" | ||||
|         app:layout_constraintTop_toTopOf="parent" | ||||
|         app:np_dividerColor="#00000000" | ||||
|         app:np_dividerThickness="0.6dp" | ||||
|         app:np_wheelItemCount="5" /> | ||||
| 
 | ||||
|     <com.loper7.date_time_picker.number_picker.NumberPicker | ||||
|         android:id="@+id/np_datetime_month" | ||||
|         android:layout_width="@dimen/_90dp" | ||||
|         android:layout_height="wrap_content" | ||||
|         app:layout_constraintBottom_toBottomOf="parent" | ||||
|         app:layout_constraintStart_toEndOf="@+id/np_datetime_year" | ||||
|         app:layout_constraintTop_toTopOf="parent" | ||||
|         app:np_dividerColor="#00000000" | ||||
|         app:np_dividerThickness="0.6dp" | ||||
|         app:np_wheelItemCount="5" /> | ||||
| 
 | ||||
|     <com.loper7.date_time_picker.number_picker.NumberPicker | ||||
|         android:id="@+id/np_datetime_day" | ||||
|         android:layout_width="@dimen/_90dp" | ||||
|         android:layout_height="wrap_content" | ||||
|         app:layout_constraintBottom_toBottomOf="parent" | ||||
|         app:layout_constraintStart_toEndOf="@+id/np_datetime_month" | ||||
|         app:layout_constraintTop_toTopOf="parent" | ||||
|         app:np_dividerColor="#00000000" | ||||
|         app:np_dividerThickness="0.6dp" | ||||
|         app:np_wheelItemCount="5" /> | ||||
| 
 | ||||
|     <com.loper7.date_time_picker.number_picker.NumberPicker | ||||
|         android:id="@+id/np_datetime_hour" | ||||
|         android:layout_width="@dimen/_90dp" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:layout_marginStart="16dp" | ||||
|         app:layout_constraintBottom_toBottomOf="parent" | ||||
|         app:layout_constraintStart_toEndOf="@+id/np_datetime_day" | ||||
|         app:layout_constraintTop_toTopOf="parent" | ||||
|         app:np_dividerColor="#00000000" | ||||
|         app:np_dividerThickness="0.6dp" | ||||
|         app:np_wheelItemCount="5" /> | ||||
| 
 | ||||
|     <TextView | ||||
|         android:layout_width="4dp" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:text=":" | ||||
|         android:textColor="#999999" | ||||
|         android:textSize="16sp" | ||||
|         app:layout_constraintBottom_toBottomOf="parent" | ||||
|         app:layout_constraintEnd_toStartOf="@+id/np_datetime_minute" | ||||
|         app:layout_constraintStart_toEndOf="@+id/np_datetime_hour" | ||||
|         app:layout_constraintTop_toTopOf="parent" /> | ||||
| 
 | ||||
|     <com.loper7.date_time_picker.number_picker.NumberPicker | ||||
|         android:id="@+id/np_datetime_minute" | ||||
|         android:layout_width="@dimen/_90dp" | ||||
|         android:layout_height="wrap_content" | ||||
|         app:layout_constraintBottom_toBottomOf="parent" | ||||
|         app:layout_constraintStart_toEndOf="@+id/np_datetime_hour" | ||||
|         app:layout_constraintTop_toTopOf="parent" | ||||
|         app:np_dividerColor="#00000000" | ||||
|         app:np_dividerThickness="0.6dp" | ||||
|         app:np_wheelItemCount="5" /> | ||||
| </androidx.constraintlayout.widget.ConstraintLayout> | ||||
					Loading…
					
					
				
		Reference in New Issue