mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2024-11-24 10:54:36 -06:00
[Lab] Add Open Chucker button. (#114)
This commit is contained in:
parent
c39b5442c9
commit
3f11e75985
@ -9,7 +9,10 @@ import android.os.Process
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.sqlite.db.SimpleSQLiteQuery
|
||||
import com.chuckerteam.chucker.api.Chucker
|
||||
import com.chuckerteam.chucker.api.Chucker.SCREEN_HTTP
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
@ -95,6 +98,13 @@ class LabPageFragment : LazyFragment(), CoroutineScope {
|
||||
.show()
|
||||
}
|
||||
|
||||
if (App.enableChucker) {
|
||||
b.openChucker.isVisible = true
|
||||
b.openChucker.onClick {
|
||||
startActivity(Chucker.getLaunchIntent(activity, SCREEN_HTTP))
|
||||
}
|
||||
}
|
||||
|
||||
b.disableDebug.onClick {
|
||||
app.config.devMode = false
|
||||
App.devMode = false
|
||||
|
@ -47,6 +47,15 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Chucker" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/openChucker"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Open Chucker"
|
||||
android:textAllCaps="false"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/last10unseen"
|
||||
android:layout_width="match_parent"
|
||||
|
Loading…
Reference in New Issue
Block a user