mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-02-27 17:17:45 +01:00
adding some sorting indicators at the laps
This commit is contained in:
parent
916e7db548
commit
b7707b351e
app/src/main
kotlin/com/simplemobiletools/clock/fragments
res
drawable-hdpi
drawable-xhdpi
drawable-xxhdpi
drawable-xxxhdpi
layout
values
@ -85,11 +85,16 @@ class StopwatchFragment : Fragment() {
|
||||
}
|
||||
|
||||
private fun setupViews() {
|
||||
context!!.apply {
|
||||
updateTextColors(view.stopwatch_fragment)
|
||||
view.stopwatch_play_pause.background = resources.getColoredDrawableWithColor(R.drawable.circle_background_filled, getAdjustedPrimaryColor())
|
||||
view.stopwatch_reset.applyColorFilter(config.textColor)
|
||||
val adjustedPrimaryColor = context!!.getAdjustedPrimaryColor()
|
||||
view.apply {
|
||||
context!!.updateTextColors(stopwatch_fragment)
|
||||
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()
|
||||
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 ![]() (image error) 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 ![]() (image error) 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 ![]() (image error) 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 ![]() (image error) Size: 318 B |
@ -21,6 +21,41 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
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
|
||||
android:id="@+id/stopwatch_list"
|
||||
android:layout_width="0dp"
|
||||
@ -33,7 +68,7 @@
|
||||
app:layout_constraintBottom_toTopOf="@+id/stopwatch_play_pause"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/stopwatch_time"/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/stopwatch_sorting_indicators_holder"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/stopwatch_reset"
|
||||
|
@ -11,13 +11,12 @@
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
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:gravity="end"
|
||||
android:maxLines="1"
|
||||
android:textSize="@dimen/bigger_text_size"
|
||||
app:layout_constraintEnd_toStartOf="@+id/lap_lap_time"
|
||||
app:layout_constraintHorizontal_bias="0.38"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:text="1"/>
|
||||
@ -38,6 +37,7 @@
|
||||
android:id="@+id/lap_total_time"
|
||||
android:layout_width="@dimen/lap_time_size"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="48dp"
|
||||
android:gravity="end"
|
||||
android:maxLines="1"
|
||||
android:textSize="@dimen/bigger_text_size"
|
||||
|
@ -2,7 +2,6 @@
|
||||
<dimen name="alarm_day_size">38dp</dimen>
|
||||
<dimen name="stopwatch_button_small_size">60dp</dimen>
|
||||
<dimen name="stopwatch_button_size">64dp</dimen>
|
||||
<dimen name="lap_order_size">40dp</dimen>
|
||||
<dimen name="lap_time_size">80dp</dimen>
|
||||
|
||||
<dimen name="clock_text_size">70sp</dimen>
|
||||
|
Loading…
x
Reference in New Issue
Block a user