mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2024-11-24 19:04:38 -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.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
import androidx.core.view.isVisible
|
||||||
import androidx.sqlite.db.SimpleSQLiteQuery
|
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 com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
@ -95,6 +98,13 @@ class LabPageFragment : LazyFragment(), CoroutineScope {
|
|||||||
.show()
|
.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (App.enableChucker) {
|
||||||
|
b.openChucker.isVisible = true
|
||||||
|
b.openChucker.onClick {
|
||||||
|
startActivity(Chucker.getLaunchIntent(activity, SCREEN_HTTP))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
b.disableDebug.onClick {
|
b.disableDebug.onClick {
|
||||||
app.config.devMode = false
|
app.config.devMode = false
|
||||||
App.devMode = false
|
App.devMode = false
|
||||||
|
@ -47,6 +47,15 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Chucker" />
|
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
|
<Button
|
||||||
android:id="@+id/last10unseen"
|
android:id="@+id/last10unseen"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
Loading…
Reference in New Issue
Block a user