mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-06-05 22:19:17 +02:00
updating the style of some dialogs
This commit is contained in:
@ -66,7 +66,7 @@ class EditAlarmDialog(val activity: SimpleActivity, val alarm: Alarm, val callba
|
|||||||
}
|
}
|
||||||
|
|
||||||
edit_alarm_label_image.applyColorFilter(textColor)
|
edit_alarm_label_image.applyColorFilter(textColor)
|
||||||
edit_alarm_label.setText(alarm.label)
|
edit_alarm.setText(alarm.label)
|
||||||
|
|
||||||
val dayLetters = activity.resources.getStringArray(R.array.week_day_letters).toList() as ArrayList<String>
|
val dayLetters = activity.resources.getStringArray(R.array.week_day_letters).toList() as ArrayList<String>
|
||||||
val dayIndexes = arrayListOf(0, 1, 2, 3, 4, 5, 6)
|
val dayIndexes = arrayListOf(0, 1, 2, 3, 4, 5, 6)
|
||||||
@ -126,7 +126,7 @@ class EditAlarmDialog(val activity: SimpleActivity, val alarm: Alarm, val callba
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
alarm.label = view.edit_alarm_label.value
|
alarm.label = view.edit_alarm.value
|
||||||
alarm.isEnabled = true
|
alarm.isEnabled = true
|
||||||
|
|
||||||
var alarmId = alarm.id
|
var alarmId = alarm.id
|
||||||
|
@ -19,7 +19,7 @@ class EditTimeZoneDialog(val activity: SimpleActivity, val myTimeZone: MyTimeZon
|
|||||||
init {
|
init {
|
||||||
val view = activity.layoutInflater.inflate(R.layout.dialog_edit_time_zone, null).apply {
|
val view = activity.layoutInflater.inflate(R.layout.dialog_edit_time_zone, null).apply {
|
||||||
edit_time_zone_title.setText(activity.getModifiedTimeZoneTitle(myTimeZone.id))
|
edit_time_zone_title.setText(activity.getModifiedTimeZoneTitle(myTimeZone.id))
|
||||||
edit_time_zone_value.text = getDefaultTimeZoneTitle(myTimeZone.id)
|
edit_time_zone_label.setText(getDefaultTimeZoneTitle(myTimeZone.id))
|
||||||
}
|
}
|
||||||
|
|
||||||
activity.getAlertDialogBuilder()
|
activity.getAlertDialogBuilder()
|
||||||
|
@ -59,8 +59,7 @@ class EditTimerDialog(val activity: SimpleActivity, val timer: Timer, val callba
|
|||||||
}
|
}
|
||||||
|
|
||||||
edit_timer_label_image.applyColorFilter(textColor)
|
edit_timer_label_image.applyColorFilter(textColor)
|
||||||
edit_timer_label.setText(timer.label)
|
edit_timer.setText(timer.label)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
activity.getAlertDialogBuilder()
|
activity.getAlertDialogBuilder()
|
||||||
@ -69,7 +68,7 @@ class EditTimerDialog(val activity: SimpleActivity, val timer: Timer, val callba
|
|||||||
.apply {
|
.apply {
|
||||||
activity.setupDialogStuff(view, this) { alertDialog ->
|
activity.setupDialogStuff(view, this) { alertDialog ->
|
||||||
alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
|
alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
|
||||||
timer.label = view.edit_timer_label.value
|
timer.label = view.edit_timer.value
|
||||||
activity.timerHelper.insertOrUpdateTimer(timer) {
|
activity.timerHelper.insertOrUpdateTimer(timer) {
|
||||||
activity.config.timerLastConfig = timer
|
activity.config.timerLastConfig = timer
|
||||||
callback()
|
callback()
|
||||||
|
@ -95,26 +95,31 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/edit_alarm_sound"
|
android:layout_below="@+id/edit_alarm_sound"
|
||||||
android:layout_alignTop="@+id/edit_alarm_label"
|
android:layout_alignTop="@+id/edit_alarm_hint"
|
||||||
android:layout_alignBottom="@+id/edit_alarm_label"
|
android:layout_alignBottom="@+id/edit_alarm_hint"
|
||||||
android:layout_marginStart="@dimen/activity_margin"
|
android:layout_marginStart="@dimen/activity_margin"
|
||||||
android:layout_marginEnd="@dimen/tiny_margin"
|
android:layout_marginEnd="@dimen/tiny_margin"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:src="@drawable/ic_label_vector" />
|
android:src="@drawable/ic_label_vector" />
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyEditText
|
<com.simplemobiletools.commons.views.MyTextInputLayout
|
||||||
android:id="@+id/edit_alarm_label"
|
android:id="@+id/edit_alarm_hint"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/edit_alarm_sound"
|
android:layout_below="@+id/edit_alarm_sound"
|
||||||
android:layout_marginStart="@dimen/medium_margin"
|
android:layout_marginStart="@dimen/medium_margin"
|
||||||
android:layout_marginTop="@dimen/small_margin"
|
android:layout_marginEnd="@dimen/bigger_margin"
|
||||||
android:layout_toEndOf="@+id/edit_alarm_label_image"
|
android:layout_toEndOf="@+id/edit_alarm_label_image"
|
||||||
android:hint="@string/label"
|
android:hint="@string/label">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/edit_alarm"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textCursorDrawable="@null"
|
android:textSize="@dimen/normal_text_size" />
|
||||||
android:textSize="@dimen/bigger_text_size" />
|
|
||||||
|
|
||||||
|
</com.simplemobiletools.commons.views.MyTextInputLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
@ -7,36 +7,38 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="@dimen/activity_margin">
|
android:padding="@dimen/activity_margin">
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextInputLayout
|
||||||
android:id="@+id/edit_time_zone_title_label"
|
android:id="@+id/edit_time_zone_title_hint"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/tiny_margin"
|
|
||||||
android:text="@string/title" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyEditText
|
|
||||||
android:id="@+id/edit_time_zone_title"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="@dimen/activity_margin"
|
android:layout_marginBottom="@dimen/activity_margin"
|
||||||
|
android:hint="@string/title">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/edit_time_zone_title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:maxLines="1"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textCursorDrawable="@null"
|
|
||||||
android:textSize="@dimen/normal_text_size" />
|
android:textSize="@dimen/normal_text_size" />
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
</com.simplemobiletools.commons.views.MyTextInputLayout>
|
||||||
android:id="@+id/edit_time_zone_label"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/tiny_margin"
|
|
||||||
android:text="@string/time_zone" />
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyTextView
|
<com.simplemobiletools.commons.views.MyTextInputLayout
|
||||||
android:id="@+id/edit_time_zone_value"
|
android:id="@+id/edit_time_zone_label_hint"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/tiny_margin"
|
android:hint="@string/time_zone">
|
||||||
android:paddingTop="@dimen/small_margin"
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/edit_time_zone_label"
|
||||||
|
style="@style/UnclickableEditText"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:singleLine="true"
|
||||||
android:textSize="@dimen/normal_text_size"
|
android:textSize="@dimen/normal_text_size"
|
||||||
tools:text="GMT-11:00 Midway" />
|
tools:text="GMT-11:00 Midway" />
|
||||||
|
|
||||||
|
</com.simplemobiletools.commons.views.MyTextInputLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -89,17 +89,23 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@drawable/ic_label_vector" />
|
android:src="@drawable/ic_label_vector" />
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MyEditText
|
<com.simplemobiletools.commons.views.MyTextInputLayout
|
||||||
android:id="@+id/edit_timer_label"
|
android:id="@+id/edit_timer_hint"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/medium_margin"
|
||||||
|
android:layout_marginEnd="@dimen/medium_margin"
|
||||||
|
android:hint="@string/label">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/edit_timer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:hint="@string/label"
|
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textCursorDrawable="@null"
|
android:textSize="@dimen/normal_text_size" />
|
||||||
android:textSize="@dimen/bigger_text_size" />
|
|
||||||
|
|
||||||
|
</com.simplemobiletools.commons.views.MyTextInputLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
Reference in New Issue
Block a user