Dana: make clickable whole layout
This commit is contained in:
parent
4cea57acf6
commit
2e78566b41
|
@ -109,7 +109,7 @@ class DanaFragment : DaggerFragment() {
|
||||||
}
|
}
|
||||||
binding.stats.setOnClickListener { startActivity(Intent(context, TDDStatsActivity::class.java)) }
|
binding.stats.setOnClickListener { startActivity(Intent(context, TDDStatsActivity::class.java)) }
|
||||||
binding.userOptions.setOnClickListener { startActivity(Intent(context, DanaUserOptionsActivity::class.java)) }
|
binding.userOptions.setOnClickListener { startActivity(Intent(context, DanaUserOptionsActivity::class.java)) }
|
||||||
binding.btconnection.setOnClickListener {
|
binding.btConnectionLayout.setOnClickListener {
|
||||||
aapsLogger.debug(LTag.PUMP, "Clicked connect to pump")
|
aapsLogger.debug(LTag.PUMP, "Clicked connect to pump")
|
||||||
danaPump.reset()
|
danaPump.reset()
|
||||||
commandQueue.readStatus("Clicked connect to pump", null)
|
commandQueue.readStatus("Clicked connect to pump", null)
|
||||||
|
@ -117,7 +117,7 @@ class DanaFragment : DaggerFragment() {
|
||||||
if (activePlugin.activePump.pumpDescription.pumpType == PumpType.DANA_RS ||
|
if (activePlugin.activePump.pumpDescription.pumpType == PumpType.DANA_RS ||
|
||||||
activePlugin.activePump.pumpDescription.pumpType == PumpType.DANA_I
|
activePlugin.activePump.pumpDescription.pumpType == PumpType.DANA_I
|
||||||
)
|
)
|
||||||
binding.btconnection.setOnLongClickListener {
|
binding.btConnectionLayout.setOnLongClickListener {
|
||||||
activity?.let {
|
activity?.let {
|
||||||
OKDialog.showConfirmation(it, rh.gs(R.string.resetpairing)) {
|
OKDialog.showConfirmation(it, rh.gs(R.string.resetpairing)) {
|
||||||
uel.log(Action.CLEAR_PAIRING_KEYS, Sources.Dana)
|
uel.log(Action.CLEAR_PAIRING_KEYS, Sources.Dana)
|
||||||
|
@ -167,7 +167,7 @@ class DanaFragment : DaggerFragment() {
|
||||||
else ->
|
else ->
|
||||||
"{fa-bluetooth-b}"
|
"{fa-bluetooth-b}"
|
||||||
}
|
}
|
||||||
binding.btconnection.text = pumpStatusIcon
|
binding.btConnection.text = pumpStatusIcon
|
||||||
pumpStatus = it.getStatus(rh)
|
pumpStatus = it.getStatus(rh)
|
||||||
binding.pumpStatus.text = pumpStatus
|
binding.pumpStatus.text = pumpStatus
|
||||||
binding.pumpStatusLayout.visibility = (pumpStatus != "").toVisibility()
|
binding.pumpStatusLayout.visibility = (pumpStatus != "").toVisibility()
|
||||||
|
|
|
@ -67,6 +67,7 @@
|
||||||
android:background="@color/list_delimiter" />
|
android:background="@color/list_delimiter" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/bt_connection_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
@ -93,7 +94,7 @@
|
||||||
tools:ignore="HardcodedText" />
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
<com.joanzapata.iconify.widget.IconTextView
|
<com.joanzapata.iconify.widget.IconTextView
|
||||||
android:id="@+id/btconnection"
|
android:id="@+id/bt_connection"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
|
Loading…
Reference in a new issue