Commit e597f36f authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Add a button to refresh the latency in the navigation drawer

Closes #267
parent 2cf464c6
......@@ -130,6 +130,9 @@ class MainActivity : NavigationDrawerActivity() {
getString(R.string.dialog_latency_sidebar_title),
getString(R.string.dialog_latency_sidebar_message))
}
view.refresh.setOnClickListener {
update()
}
networkManager.registerNetworkCallback(NetworkRequest.Builder().apply {
addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN)
}.build(), cardNetworkCallback!!)
......
......@@ -26,7 +26,24 @@
android:adjustViewBounds="true"
android:padding="8dp"
android:scaleType="centerInside"
android:src="@drawable/ic_info" />
android:src="@drawable/ic_info"
android:tint="?android:attr/textColor" />
<ImageButton
android:id="@+id/refresh"
style="?android:attr/borderlessButtonStyle"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_alignParentEnd="true"
android:layout_gravity="center_vertical"
android:layout_below="@id/infoButton"
android:layout_marginStart="8dp"
android:layout_marginEnd="4dp"
android:adjustViewBounds="true"
android:padding="8dp"
android:scaleType="centerInside"
android:src="@drawable/ic_refresh"
android:tint="?android:attr/textColor" />
<LinearLayout
android:layout_width="match_parent"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment