Skip to content

Instantly share code, notes, and snippets.

View mironoff2007's full-sized avatar

Mironov Ury mironoff2007

View GitHub Profile
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_web_view)
Log.d(LOG_TAG, "create activity")
binding = ActivityWebViewBinding.inflate(layoutInflater)
initWebView()
}
@SuppressLint("SetJavaScriptEnabled")
private fun initWebView() {
@mironoff2007
mironoff2007 / missed_data.kt
Last active March 6, 2023 12:36
issue, missed ui data
ScreenViewModel(repo: Repo): BaseVm {
val liveData: MutableLiveData<Data?> = MutableLiveData(null)
val handler = CoroutineExceptionHandler { _, exception ->
iLogger.appendError("test_tag","CoroutineExceptionHandler got $exception")
}
override fun onResume() {
@mironoff2007
mironoff2007 / pager.kt
Last active December 3, 2022 12:38
Compose pager example
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material.Tab
import androidx.compose.material.TabRow
import androidx.compose.material.TabRowDefaults
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.rememberCoroutineScope
/*
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software