mirror of
				https://github.com/SimpleMobileTools/Simple-Clock.git
				synced 2025-06-05 22:19:17 +02:00 
			
		
		
		
	adding some sorting indicators at the laps
This commit is contained in:
		| @@ -85,11 +85,16 @@ class StopwatchFragment : Fragment() { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     private fun setupViews() { |     private fun setupViews() { | ||||||
|         context!!.apply { |         val adjustedPrimaryColor = context!!.getAdjustedPrimaryColor() | ||||||
|             updateTextColors(view.stopwatch_fragment) |         view.apply { | ||||||
|             view.stopwatch_play_pause.background = resources.getColoredDrawableWithColor(R.drawable.circle_background_filled, getAdjustedPrimaryColor()) |             context!!.updateTextColors(stopwatch_fragment) | ||||||
|             view.stopwatch_reset.applyColorFilter(config.textColor) |             stopwatch_play_pause.background = resources.getColoredDrawableWithColor(R.drawable.circle_background_filled, adjustedPrimaryColor) | ||||||
|  |             stopwatch_reset.applyColorFilter(context!!.config.textColor) | ||||||
|  |             stopwatch_sorting_indicator_1.applyColorFilter(adjustedPrimaryColor) | ||||||
|  |             stopwatch_sorting_indicator_2.applyColorFilter(adjustedPrimaryColor) | ||||||
|  |             stopwatch_sorting_indicator_3.applyColorFilter(adjustedPrimaryColor) | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         updateIcons() |         updateIcons() | ||||||
|         updateDisplayedText() |         updateDisplayedText() | ||||||
|     } |     } | ||||||
|   | |||||||
							
								
								
									
										
											BIN
										
									
								
								app/src/main/res/drawable-hdpi/ic_sorting_triangle.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								app/src/main/res/drawable-hdpi/ic_sorting_triangle.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 288 B | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/res/drawable-xhdpi/ic_sorting_triangle.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								app/src/main/res/drawable-xhdpi/ic_sorting_triangle.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 251 B | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/res/drawable-xxhdpi/ic_sorting_triangle.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								app/src/main/res/drawable-xxhdpi/ic_sorting_triangle.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 482 B | 
							
								
								
									
										
											BIN
										
									
								
								app/src/main/res/drawable-xxxhdpi/ic_sorting_triangle.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								app/src/main/res/drawable-xxxhdpi/ic_sorting_triangle.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 318 B | 
| @@ -21,6 +21,41 @@ | |||||||
|         app:layout_constraintTop_toTopOf="parent" |         app:layout_constraintTop_toTopOf="parent" | ||||||
|         tools:text="00.00"/> |         tools:text="00.00"/> | ||||||
|  |  | ||||||
|  |     <android.support.constraint.ConstraintLayout | ||||||
|  |         android:id="@+id/stopwatch_sorting_indicators_holder" | ||||||
|  |         android:layout_width="match_parent" | ||||||
|  |         android:layout_height="wrap_content" | ||||||
|  |         app:layout_constraintTop_toBottomOf="@+id/stopwatch_time"> | ||||||
|  |  | ||||||
|  |         <ImageView | ||||||
|  |             android:id="@+id/stopwatch_sorting_indicator_1" | ||||||
|  |             android:layout_width="@dimen/lap_time_size" | ||||||
|  |             android:layout_height="wrap_content" | ||||||
|  |             android:src="@drawable/ic_sorting_triangle" | ||||||
|  |             app:layout_constraintEnd_toStartOf="@+id/stopwatch_sorting_indicator_2" | ||||||
|  |             app:layout_constraintHorizontal_chainStyle="packed" | ||||||
|  |             app:layout_constraintStart_toStartOf="parent"/> | ||||||
|  |  | ||||||
|  |         <ImageView | ||||||
|  |             android:id="@+id/stopwatch_sorting_indicator_2" | ||||||
|  |             android:layout_width="@dimen/lap_time_size" | ||||||
|  |             android:layout_height="wrap_content" | ||||||
|  |             android:src="@drawable/ic_sorting_triangle" | ||||||
|  |             app:layout_constraintEnd_toStartOf="@+id/stopwatch_sorting_indicator_3" | ||||||
|  |             app:layout_constraintStart_toEndOf="@+id/stopwatch_sorting_indicator_1" | ||||||
|  |             app:layout_constraintTop_toTopOf="parent"/> | ||||||
|  |  | ||||||
|  |         <ImageView | ||||||
|  |             android:id="@+id/stopwatch_sorting_indicator_3" | ||||||
|  |             android:layout_width="@dimen/lap_time_size" | ||||||
|  |             android:layout_height="wrap_content" | ||||||
|  |             android:src="@drawable/ic_sorting_triangle" | ||||||
|  |             app:layout_constraintEnd_toEndOf="parent" | ||||||
|  |             app:layout_constraintStart_toEndOf="@+id/stopwatch_sorting_indicator_2" | ||||||
|  |             app:layout_constraintTop_toTopOf="parent"/> | ||||||
|  |  | ||||||
|  |     </android.support.constraint.ConstraintLayout> | ||||||
|  |  | ||||||
|     <com.simplemobiletools.commons.views.MyRecyclerView |     <com.simplemobiletools.commons.views.MyRecyclerView | ||||||
|         android:id="@+id/stopwatch_list" |         android:id="@+id/stopwatch_list" | ||||||
|         android:layout_width="0dp" |         android:layout_width="0dp" | ||||||
| @@ -33,7 +68,7 @@ | |||||||
|         app:layout_constraintBottom_toTopOf="@+id/stopwatch_play_pause" |         app:layout_constraintBottom_toTopOf="@+id/stopwatch_play_pause" | ||||||
|         app:layout_constraintEnd_toEndOf="parent" |         app:layout_constraintEnd_toEndOf="parent" | ||||||
|         app:layout_constraintStart_toStartOf="parent" |         app:layout_constraintStart_toStartOf="parent" | ||||||
|         app:layout_constraintTop_toBottomOf="@+id/stopwatch_time"/> |         app:layout_constraintTop_toBottomOf="@+id/stopwatch_sorting_indicators_holder"/> | ||||||
|  |  | ||||||
|     <ImageView |     <ImageView | ||||||
|         android:id="@+id/stopwatch_reset" |         android:id="@+id/stopwatch_reset" | ||||||
|   | |||||||
| @@ -11,13 +11,12 @@ | |||||||
|  |  | ||||||
|     <com.simplemobiletools.commons.views.MyTextView |     <com.simplemobiletools.commons.views.MyTextView | ||||||
|         android:id="@+id/lap_order" |         android:id="@+id/lap_order" | ||||||
|         android:layout_width="@dimen/lap_order_size" |         android:layout_width="@dimen/lap_time_size" | ||||||
|         android:layout_height="wrap_content" |         android:layout_height="wrap_content" | ||||||
|         android:gravity="end" |         android:gravity="end" | ||||||
|         android:maxLines="1" |         android:maxLines="1" | ||||||
|         android:textSize="@dimen/bigger_text_size" |         android:textSize="@dimen/bigger_text_size" | ||||||
|         app:layout_constraintEnd_toStartOf="@+id/lap_lap_time" |         app:layout_constraintEnd_toStartOf="@+id/lap_lap_time" | ||||||
|         app:layout_constraintHorizontal_bias="0.38" |  | ||||||
|         app:layout_constraintHorizontal_chainStyle="packed" |         app:layout_constraintHorizontal_chainStyle="packed" | ||||||
|         app:layout_constraintStart_toStartOf="parent" |         app:layout_constraintStart_toStartOf="parent" | ||||||
|         tools:text="1"/> |         tools:text="1"/> | ||||||
| @@ -38,6 +37,7 @@ | |||||||
|         android:id="@+id/lap_total_time" |         android:id="@+id/lap_total_time" | ||||||
|         android:layout_width="@dimen/lap_time_size" |         android:layout_width="@dimen/lap_time_size" | ||||||
|         android:layout_height="wrap_content" |         android:layout_height="wrap_content" | ||||||
|  |         android:layout_marginRight="48dp" | ||||||
|         android:gravity="end" |         android:gravity="end" | ||||||
|         android:maxLines="1" |         android:maxLines="1" | ||||||
|         android:textSize="@dimen/bigger_text_size" |         android:textSize="@dimen/bigger_text_size" | ||||||
|   | |||||||
| @@ -2,7 +2,6 @@ | |||||||
|     <dimen name="alarm_day_size">38dp</dimen> |     <dimen name="alarm_day_size">38dp</dimen> | ||||||
|     <dimen name="stopwatch_button_small_size">60dp</dimen> |     <dimen name="stopwatch_button_small_size">60dp</dimen> | ||||||
|     <dimen name="stopwatch_button_size">64dp</dimen> |     <dimen name="stopwatch_button_size">64dp</dimen> | ||||||
|     <dimen name="lap_order_size">40dp</dimen> |  | ||||||
|     <dimen name="lap_time_size">80dp</dimen> |     <dimen name="lap_time_size">80dp</dimen> | ||||||
|  |  | ||||||
|     <dimen name="clock_text_size">70sp</dimen> |     <dimen name="clock_text_size">70sp</dimen> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user