Merge pull request #2716 from Philoul/Replace_Png_Icons
Replace some png icons by vector
|
@ -98,7 +98,7 @@ abstract class Trigger(val injector: HasAndroidInjector) {
|
|||
)
|
||||
params.gravity = Gravity.CENTER
|
||||
buttonAdd.layoutParams = params
|
||||
buttonAdd.setImageResource(R.drawable.add)
|
||||
buttonAdd.setImageResource(R.drawable.ic_add)
|
||||
buttonAdd.contentDescription = resourceHelper.gs(R.string.add_short)
|
||||
buttonAdd.setOnClickListener {
|
||||
scanForActivity(context)?.supportFragmentManager?.let {
|
||||
|
@ -124,7 +124,7 @@ abstract class Trigger(val injector: HasAndroidInjector) {
|
|||
)
|
||||
params.gravity = Gravity.CENTER
|
||||
buttonRemove.layoutParams = params
|
||||
buttonRemove.setImageResource(R.drawable.remove)
|
||||
buttonRemove.setImageResource(R.drawable.ic_remove)
|
||||
buttonRemove.contentDescription = resourceHelper.gs(R.string.delete_short)
|
||||
buttonRemove.setOnClickListener {
|
||||
rxBus.send(EventTriggerRemove(trigger))
|
||||
|
@ -141,7 +141,7 @@ abstract class Trigger(val injector: HasAndroidInjector) {
|
|||
)
|
||||
params.gravity = Gravity.CENTER
|
||||
buttonClone.layoutParams = params
|
||||
buttonClone.setImageResource(R.drawable.clone)
|
||||
buttonClone.setImageResource(R.drawable.ic_clone)
|
||||
buttonClone.contentDescription = resourceHelper.gs(R.string.copy_short)
|
||||
buttonClone.setOnClickListener {
|
||||
rxBus.send(EventTriggerClone(trigger))
|
||||
|
|
|
@ -68,7 +68,7 @@ class TriggerAutosensValue(injector: HasAndroidInjector) : Trigger(injector) {
|
|||
override fun friendlyDescription(): String =
|
||||
resourceHelper.gs(R.string.autosenscompared, resourceHelper.gs(comparator.value.stringRes), autosens.value)
|
||||
|
||||
override fun icon(): Optional<Int?> = Optional.of(R.drawable.`as`)
|
||||
override fun icon(): Optional<Int?> = Optional.of(R.drawable.`ic_as`)
|
||||
|
||||
override fun duplicate(): Trigger = TriggerAutosensValue(injector, this)
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ class TriggerBolusAgo(injector: HasAndroidInjector) : Trigger(injector) {
|
|||
override fun friendlyDescription(): String =
|
||||
resourceHelper.gs(R.string.lastboluscompared, resourceHelper.gs(comparator.value.stringRes), minutesAgo.getMinutes())
|
||||
|
||||
override fun icon(): Optional<Int?> = Optional.of(R.drawable.icon_bolus)
|
||||
override fun icon(): Optional<Int?> = Optional.of(R.drawable.ic_bolus)
|
||||
|
||||
override fun duplicate(): Trigger = TriggerBolusAgo(injector, this)
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ class TriggerCOB(injector: HasAndroidInjector) : Trigger(injector) {
|
|||
override fun friendlyDescription(): String =
|
||||
resourceHelper.gs(R.string.cobcompared, resourceHelper.gs(comparator.value.stringRes), cob.value)
|
||||
|
||||
override fun icon(): Optional<Int?> = Optional.of(R.drawable.icon_cp_bolus_carbs)
|
||||
override fun icon(): Optional<Int?> = Optional.of(R.drawable.ic_cp_bolus_carbs)
|
||||
|
||||
override fun duplicate(): Trigger = TriggerCOB(injector, this)
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ class TriggerDelta(injector: HasAndroidInjector) : Trigger(injector) {
|
|||
override fun friendlyDescription(): String =
|
||||
resourceHelper.gs(R.string.deltacompared, resourceHelper.gs(comparator.value.stringRes), delta.value, resourceHelper.gs(delta.deltaType.stringRes))
|
||||
|
||||
override fun icon(): Optional<Int?> = Optional.of(R.drawable.icon_auto_delta)
|
||||
override fun icon(): Optional<Int?> = Optional.of(R.drawable.ic_auto_delta)
|
||||
|
||||
override fun duplicate(): Trigger = TriggerDelta(injector, this)
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ class TriggerPumpLastConnection(injector: HasAndroidInjector) : Trigger(injector
|
|||
override fun friendlyDescription(): String =
|
||||
resourceHelper.gs(R.string.automation_trigger_pump_last_connection_compared, resourceHelper.gs(comparator.value.stringRes), minutesAgo.value)
|
||||
|
||||
override fun icon(): Optional<Int?> = Optional.of(R.drawable.remove)
|
||||
override fun icon(): Optional<Int?> = Optional.of(R.drawable.ic_remove)
|
||||
|
||||
override fun duplicate(): Trigger = TriggerPumpLastConnection(injector, this)
|
||||
|
||||
|
|
|
@ -600,42 +600,42 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
overview_apsmode?.visibility = View.VISIBLE
|
||||
when {
|
||||
loopPlugin.isEnabled() && loopPlugin.isSuperBolus -> {
|
||||
overview_apsmode.setImageResource(R.drawable.loop_superbolus)
|
||||
overview_apsmode.setImageResource(R.drawable.ic_loop_superbolus)
|
||||
overview_apsmode_text?.text = DateUtil.age(loopPlugin.minutesToEndOfSuspend() * 60000L, true, resourceHelper)
|
||||
}
|
||||
|
||||
loopPlugin.isDisconnected -> {
|
||||
overview_apsmode.setImageResource(R.drawable.loop_disconnected)
|
||||
overview_apsmode.setImageResource(R.drawable.ic_loop_disconnected)
|
||||
overview_apsmode_text?.text = DateUtil.age(loopPlugin.minutesToEndOfSuspend() * 60000L, true, resourceHelper)
|
||||
}
|
||||
|
||||
loopPlugin.isEnabled() && loopPlugin.isSuspended -> {
|
||||
overview_apsmode.setImageResource(R.drawable.loop_paused)
|
||||
overview_apsmode.setImageResource(R.drawable.ic_loop_paused)
|
||||
overview_apsmode_text?.text = DateUtil.age(loopPlugin.minutesToEndOfSuspend() * 60000L, true, resourceHelper)
|
||||
}
|
||||
|
||||
pump.isSuspended -> {
|
||||
overview_apsmode.setImageResource(R.drawable.loop_paused)
|
||||
overview_apsmode.setImageResource(R.drawable.ic_loop_paused)
|
||||
overview_apsmode_text?.text = ""
|
||||
}
|
||||
|
||||
loopPlugin.isEnabled() && closedLoopEnabled.value() && loopPlugin.isLGS -> {
|
||||
overview_apsmode.setImageResource(R.drawable.loop_lgs)
|
||||
overview_apsmode.setImageResource(R.drawable.ic_loop_lgs)
|
||||
overview_apsmode_text?.text = ""
|
||||
}
|
||||
|
||||
loopPlugin.isEnabled() && closedLoopEnabled.value() -> {
|
||||
overview_apsmode.setImageResource(R.drawable.loop_closed)
|
||||
overview_apsmode.setImageResource(R.drawable.ic_loop_closed)
|
||||
overview_apsmode_text?.text = ""
|
||||
}
|
||||
|
||||
loopPlugin.isEnabled() && !closedLoopEnabled.value() -> {
|
||||
overview_apsmode.setImageResource(R.drawable.loop_open)
|
||||
overview_apsmode.setImageResource(R.drawable.ic_loop_open)
|
||||
overview_apsmode_text?.text = ""
|
||||
}
|
||||
|
||||
else -> {
|
||||
overview_apsmode.setImageResource(R.drawable.loop_disabled)
|
||||
overview_apsmode.setImageResource(R.drawable.ic_loop_disabled)
|
||||
overview_apsmode_text?.text = ""
|
||||
}
|
||||
}
|
||||
|
@ -681,9 +681,9 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
?: resourceHelper.gc(R.color.defaulttextcolor))
|
||||
|
||||
if (activeTemp != null)
|
||||
overview_basebasal_icon.setImageResource(if (activeTemp.tempBasalConvertedToPercent(System.currentTimeMillis(), profile) > 100) R.drawable.icon_cp_basal_tbr_high else R.drawable.icon_cp_basal_tbr_low)
|
||||
overview_basebasal_icon.setImageResource(if (activeTemp.tempBasalConvertedToPercent(System.currentTimeMillis(), profile) > 100) R.drawable.ic_cp_basal_tbr_high else R.drawable.ic_cp_basal_tbr_low)
|
||||
else
|
||||
overview_basebasal_icon.setImageResource(R.drawable.icon_cp_basal_no_tbr)
|
||||
overview_basebasal_icon.setImageResource(R.drawable.ic_cp_basal_no_tbr)
|
||||
|
||||
// Extended bolus
|
||||
val extendedBolus = treatmentsPlugin.getExtendedBolusFromHistory(System.currentTimeMillis())
|
||||
|
@ -777,7 +777,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
if (sp.getBoolean(R.string.key_openapsama_useautosens, false) && constraintChecker.isAutosensModeEnabled().value()) {
|
||||
overview_sensitivity_icon.setImageResource(R.drawable.ic_swap_vert_black_48dp_green)
|
||||
} else {
|
||||
overview_sensitivity_icon.setImageResource(R.drawable.ic_x_swap_vert_48px_green)
|
||||
overview_sensitivity_icon.setImageResource(R.drawable.ic_x_swap_vert)
|
||||
}
|
||||
|
||||
overview_sensitivity?.text =
|
||||
|
|
|
@ -111,7 +111,7 @@ public class TimeListEdit {
|
|||
// last "plus" to append new interval
|
||||
float factor = layout.getContext().getResources().getDisplayMetrics().density;
|
||||
finalAdd = new ImageView(context);
|
||||
finalAdd.setImageResource(R.drawable.add);
|
||||
finalAdd.setImageResource(R.drawable.ic_add);
|
||||
LinearLayout.LayoutParams illp = new LinearLayout.LayoutParams((int) (35d * factor), (int) (35 * factor));
|
||||
illp.setMargins(0, 25, 0, 25); // llp.setMargins(left, top, right, bottom);
|
||||
illp.gravity = Gravity.CENTER;
|
||||
|
|
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 745 B |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 698 B |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 651 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 941 B |
Before Width: | Height: | Size: 867 B |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 616 B |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 905 B |
Before Width: | Height: | Size: 948 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 832 B |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 785 B |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 935 B |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 897 B |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 8.5 KiB |