Sensitivity Icon (50% alpha if autosens disable)

This commit is contained in:
Philoul 2020-05-14 12:42:33 +02:00
parent bc217438e9
commit 47725ad5d5
2 changed files with 5 additions and 0 deletions

View file

@ -757,6 +757,10 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
overview_uploader?.setOnClickListener { activity?.let { OKDialog.show(it, resourceHelper.gs(R.string.uploader), nsDeviceStatus.extendedUploaderStatus) } }
// Sensitivity
if(sp.getBoolean(R.string.key_openapsama_useautosens, false))
overview_sensitivity_icon?.alpha=1F
else
overview_sensitivity_icon?.alpha=0.5F
overview_sensitivity?.text =
iobCobCalculatorPlugin.getLastAutosensData("Overview")?.let { autosensData ->
String.format(Locale.ENGLISH, "%.0f%%", autosensData.autosensResult.ratio * 100)

View file

@ -222,6 +222,7 @@
app:layout_constraintTop_toBottomOf="@+id/overview_bg">
<ImageView
android:id="@+id/overview_sensitivity_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"