Merge remote-tracking branch 'ns/dev' into wear
This commit is contained in:
commit
416f512a52
15 changed files with 26 additions and 23 deletions
|
@ -57,7 +57,7 @@
|
||||||
<activity
|
<activity
|
||||||
android:name=".widget.WidgetConfigureActivity"
|
android:name=".widget.WidgetConfigureActivity"
|
||||||
android:theme="@android:style/Theme.Material.Dialog.NoActionBar"
|
android:theme="@android:style/Theme.Material.Dialog.NoActionBar"
|
||||||
android:exported="true">
|
android:exported="false">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
|
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
|
@ -296,6 +296,7 @@ class MainActivity : NoSplashAppCompatActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||||
|
menu.setGroupDividerEnabled(true)
|
||||||
this.menu = menu
|
this.menu = menu
|
||||||
menuInflater.inflate(R.menu.menu_main, menu)
|
menuInflater.inflate(R.menu.menu_main, menu)
|
||||||
pluginPreferencesMenuItem = menu.findItem(R.id.nav_plugin_preferences)
|
pluginPreferencesMenuItem = menu.findItem(R.id.nav_plugin_preferences)
|
||||||
|
|
|
@ -59,7 +59,7 @@ class OpenAPSAMAFragment : DaggerFragment() {
|
||||||
setColorSchemeColors(rh.gac(context, R.attr.colorPrimaryDark), rh.gac(context, R.attr.colorPrimary), rh.gac(context, R.attr.colorSecondary))
|
setColorSchemeColors(rh.gac(context, R.attr.colorPrimaryDark), rh.gac(context, R.attr.colorPrimary), rh.gac(context, R.attr.colorSecondary))
|
||||||
setOnRefreshListener {
|
setOnRefreshListener {
|
||||||
binding.lastrun.text = rh.gs(info.nightscout.androidaps.R.string.executing)
|
binding.lastrun.text = rh.gs(info.nightscout.androidaps.R.string.executing)
|
||||||
openAPSAMAPlugin.invoke("OpenAPSAMA swiperefresh", false)
|
Thread { openAPSAMAPlugin.invoke("OpenAPSAMA swiperefresh", false) }.start()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ class OpenAPSAMAFragment : DaggerFragment() {
|
||||||
when (item.itemId) {
|
when (item.itemId) {
|
||||||
ID_MENU_RUN -> {
|
ID_MENU_RUN -> {
|
||||||
binding.lastrun.text = rh.gs(R.string.executing)
|
binding.lastrun.text = rh.gs(R.string.executing)
|
||||||
openAPSAMAPlugin.invoke("OpenAPSAMA menu", false)
|
Thread { openAPSAMAPlugin.invoke("OpenAPSAMA menu", false) }.start()
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ class OpenAPSSMBFragment : DaggerFragment() {
|
||||||
@Inject lateinit var activePlugin: ActivePlugin
|
@Inject lateinit var activePlugin: ActivePlugin
|
||||||
@Inject lateinit var dateUtil: DateUtil
|
@Inject lateinit var dateUtil: DateUtil
|
||||||
@Inject lateinit var jsonFormatter: JSONFormatter
|
@Inject lateinit var jsonFormatter: JSONFormatter
|
||||||
|
private lateinit var refreshDialog: Runnable
|
||||||
|
|
||||||
private val ID_MENU_RUN = 1
|
private val ID_MENU_RUN = 1
|
||||||
|
|
||||||
|
@ -58,10 +59,9 @@ class OpenAPSSMBFragment : DaggerFragment() {
|
||||||
setColorSchemeColors(rh.gac(context, R.attr.colorPrimaryDark), rh.gac(context, R.attr.colorPrimary), rh.gac(context, R.attr.colorSecondary))
|
setColorSchemeColors(rh.gac(context, R.attr.colorPrimaryDark), rh.gac(context, R.attr.colorPrimary), rh.gac(context, R.attr.colorSecondary))
|
||||||
setOnRefreshListener {
|
setOnRefreshListener {
|
||||||
binding.lastrun.text = rh.gs(info.nightscout.androidaps.R.string.executing)
|
binding.lastrun.text = rh.gs(info.nightscout.androidaps.R.string.executing)
|
||||||
activePlugin.activeAPS.invoke("OpenAPSSMB swiperefresh", false)
|
Thread { activePlugin.activeAPS.invoke("OpenAPSSMB swiperefresh", false) }.start()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||||
|
@ -75,7 +75,7 @@ class OpenAPSSMBFragment : DaggerFragment() {
|
||||||
when (item.itemId) {
|
when (item.itemId) {
|
||||||
ID_MENU_RUN -> {
|
ID_MENU_RUN -> {
|
||||||
binding.lastrun.text = rh.gs(R.string.executing)
|
binding.lastrun.text = rh.gs(R.string.executing)
|
||||||
activePlugin.activeAPS.invoke("OpenAPSSMB menu", false)
|
Thread { activePlugin.activeAPS.invoke("OpenAPSSMB menu", false) }.start()
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
app:cardCornerRadius="4dp"
|
app:cardCornerRadius="4dp"
|
||||||
app:contentPadding="2dp"
|
app:contentPadding="2dp"
|
||||||
app:cardElevation="4dp"
|
app:cardElevation="2dp"
|
||||||
app:cardUseCompatPadding="false"
|
app:cardUseCompatPadding="false"
|
||||||
android:layout_gravity="center">
|
android:layout_gravity="center">
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
app:cardCornerRadius="4dp"
|
app:cardCornerRadius="4dp"
|
||||||
app:contentPadding="2dp"
|
app:contentPadding="2dp"
|
||||||
app:cardElevation="4dp"
|
app:cardElevation="2dp"
|
||||||
app:cardUseCompatPadding="false"
|
app:cardUseCompatPadding="false"
|
||||||
android:layout_gravity="center">
|
android:layout_gravity="center">
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
app:cardCornerRadius="4dp"
|
app:cardCornerRadius="4dp"
|
||||||
app:contentPadding="2dp"
|
app:contentPadding="2dp"
|
||||||
app:cardElevation="4dp"
|
app:cardElevation="2dp"
|
||||||
app:cardUseCompatPadding="false"
|
app:cardUseCompatPadding="false"
|
||||||
android:layout_gravity="center">
|
android:layout_gravity="center">
|
||||||
|
|
||||||
|
@ -323,7 +323,7 @@
|
||||||
android:layout_marginBottom="4dp"
|
android:layout_marginBottom="4dp"
|
||||||
app:cardCornerRadius="4dp"
|
app:cardCornerRadius="4dp"
|
||||||
app:contentPadding="2dp"
|
app:contentPadding="2dp"
|
||||||
app:cardElevation="4dp"
|
app:cardElevation="2dp"
|
||||||
app:cardUseCompatPadding="false"
|
app:cardUseCompatPadding="false"
|
||||||
android:layout_gravity="center">
|
android:layout_gravity="center">
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
android:layout_marginEnd="4dp"
|
android:layout_marginEnd="4dp"
|
||||||
app:cardCornerRadius="4dp"
|
app:cardCornerRadius="4dp"
|
||||||
app:cardElevation="4dp"
|
app:cardElevation="2dp"
|
||||||
app:cardUseCompatPadding="false"
|
app:cardUseCompatPadding="false"
|
||||||
app:contentPadding="2dp">
|
app:contentPadding="2dp">
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:layout_marginEnd="4dp"
|
android:layout_marginEnd="4dp"
|
||||||
app:cardCornerRadius="4dp"
|
app:cardCornerRadius="4dp"
|
||||||
app:cardElevation="4dp"
|
app:cardElevation="2dp"
|
||||||
app:cardUseCompatPadding="false"
|
app:cardUseCompatPadding="false"
|
||||||
app:contentPadding="2dp">
|
app:contentPadding="2dp">
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:layout_marginEnd="4dp"
|
android:layout_marginEnd="4dp"
|
||||||
app:cardCornerRadius="4dp"
|
app:cardCornerRadius="4dp"
|
||||||
app:cardElevation="4dp"
|
app:cardElevation="2dp"
|
||||||
app:cardUseCompatPadding="false"
|
app:cardUseCompatPadding="false"
|
||||||
app:contentPadding="2dp">
|
app:contentPadding="2dp">
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
app:cardCornerRadius="4dp"
|
app:cardCornerRadius="4dp"
|
||||||
app:contentPadding="2dp"
|
app:contentPadding="2dp"
|
||||||
app:cardElevation="4dp"
|
app:cardElevation="2dp"
|
||||||
android:layout_gravity="center">
|
android:layout_gravity="center">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
app:cardCornerRadius="4dp"
|
app:cardCornerRadius="4dp"
|
||||||
app:cardElevation="4dp"
|
app:cardElevation="2dp"
|
||||||
app:cardUseCompatPadding="true"
|
app:cardUseCompatPadding="true"
|
||||||
app:contentPadding="16dp"
|
app:contentPadding="16dp"
|
||||||
android:layout_gravity="center">
|
android:layout_gravity="center">
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
app:cardCornerRadius="4dp"
|
app:cardCornerRadius="4dp"
|
||||||
app:contentPadding="2dp"
|
app:contentPadding="2dp"
|
||||||
app:cardElevation="4dp"
|
app:cardElevation="2dp"
|
||||||
app:cardUseCompatPadding="true"
|
app:cardUseCompatPadding="true"
|
||||||
android:layout_gravity="center">
|
android:layout_gravity="center">
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
android:orderInCategory="1"
|
android:orderInCategory="1"
|
||||||
app:showAsAction="never"
|
app:showAsAction="never"
|
||||||
android:title="@string/nav_profilehelper" />
|
android:title="@string/nav_profilehelper" />
|
||||||
|
<group android:id="@+id/about_exit">
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_about"
|
android:id="@+id/nav_about"
|
||||||
android:orderInCategory="1"
|
android:orderInCategory="1"
|
||||||
|
@ -54,5 +55,5 @@
|
||||||
android:orderInCategory="1"
|
android:orderInCategory="1"
|
||||||
app:showAsAction="never"
|
app:showAsAction="never"
|
||||||
android:title="@string/nav_exit" />
|
android:title="@string/nav_exit" />
|
||||||
|
</group>
|
||||||
</menu>
|
</menu>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
app:cardCornerRadius="4dp"
|
app:cardCornerRadius="4dp"
|
||||||
app:contentPadding="2dp"
|
app:contentPadding="2dp"
|
||||||
app:cardElevation="4dp"
|
app:cardElevation="2dp"
|
||||||
app:cardUseCompatPadding="false"
|
app:cardUseCompatPadding="false"
|
||||||
android:layout_gravity="center">
|
android:layout_gravity="center">
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
app:cardCornerRadius="4dp"
|
app:cardCornerRadius="4dp"
|
||||||
app:contentPadding="2dp"
|
app:contentPadding="2dp"
|
||||||
app:cardElevation="4dp"
|
app:cardElevation="2dp"
|
||||||
app:cardUseCompatPadding="true"
|
app:cardUseCompatPadding="true"
|
||||||
android:layout_gravity="center">
|
android:layout_gravity="center">
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,8 @@
|
||||||
android:theme="@style/AppTheme" />
|
android:theme="@style/AppTheme" />
|
||||||
<activity
|
<activity
|
||||||
android:name="info.nightscout.androidaps.diaconn.activities.DiaconnG8BLEScanActivity"
|
android:name="info.nightscout.androidaps.diaconn.activities.DiaconnG8BLEScanActivity"
|
||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme"
|
||||||
|
android:exported="false">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="info.nightscout.androidaps.plugins.PumpDiaconnG8.activities.DiaconnG8BLEScanActivity" />
|
<action android:name="info.nightscout.androidaps.plugins.PumpDiaconnG8.activities.DiaconnG8BLEScanActivity" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginStart="4dp"
|
android:layout_marginStart="4dp"
|
||||||
app:cardCornerRadius="4dp"
|
app:cardCornerRadius="4dp"
|
||||||
app:cardElevation="4dp"
|
app:cardElevation="2dp"
|
||||||
app:cardUseCompatPadding="true"
|
app:cardUseCompatPadding="true"
|
||||||
app:contentPadding="2dp">
|
app:contentPadding="2dp">
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:layout_marginEnd="4dp"
|
android:layout_marginEnd="4dp"
|
||||||
app:cardCornerRadius="4dp"
|
app:cardCornerRadius="4dp"
|
||||||
app:cardElevation="4dp"
|
app:cardElevation="2dp"
|
||||||
app:cardUseCompatPadding="false"
|
app:cardUseCompatPadding="false"
|
||||||
app:contentPadding="2dp">
|
app:contentPadding="2dp">
|
||||||
|
|
||||||
|
@ -228,7 +228,7 @@
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:layout_marginEnd="4dp"
|
android:layout_marginEnd="4dp"
|
||||||
app:cardCornerRadius="4dp"
|
app:cardCornerRadius="4dp"
|
||||||
app:cardElevation="4dp"
|
app:cardElevation="2dp"
|
||||||
app:cardUseCompatPadding="false"
|
app:cardUseCompatPadding="false"
|
||||||
app:contentPadding="2dp">
|
app:contentPadding="2dp">
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue