mirror of
https://github.com/openlibrecommunity/olcng.git
synced 2026-07-03 14:05:17 +02:00
feat(ui): add check update menu item to navigation draw
This commit is contained in:
@@ -94,6 +94,10 @@ class MainActivity : HelperBaseActivity(), NavigationView.OnNavigationItemSelect
|
||||
requestActivityLauncher.launch(Intent(this, PerAppProxyActivity::class.java))
|
||||
binding.drawerLayout.closeDrawer(androidx.core.view.GravityCompat.START)
|
||||
}
|
||||
findViewById<android.widget.TextView>(R.id.drawer_check_update)?.setOnClickListener {
|
||||
startActivity(Intent(this, CheckUpdateActivity::class.java))
|
||||
binding.drawerLayout.closeDrawer(androidx.core.view.GravityCompat.START)
|
||||
}
|
||||
fun removeUnderlines(textView: android.widget.TextView?) {
|
||||
if (textView == null) return
|
||||
textView.movementMethod = android.text.method.LinkMovementMethod.getInstance()
|
||||
|
||||
@@ -190,13 +190,27 @@
|
||||
android:drawablePadding="12dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:text="@string/per_app_proxy_settings"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/drawer_check_update"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="12dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:text="@string/update_check_for_update"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
|
||||
Reference in New Issue
Block a user