Skip to content

Instantly share code, notes, and snippets.

View eugene-drapoguz's full-sized avatar

Eugene Drapoguz eugene-drapoguz

View GitHub Profile
Я бы эту задачу решал через связные списки
https://ru.wikipedia.org/wiki/%D0%A1%D0%B2%D1%8F%D0%B7%D0%BD%D1%8B%D0%B9_%D1%81%D0%BF%D0%B8%D1%81%D0%BE%D0%BA
DATA_OBJECT
{
Field1,
Field2,
List1
[
ListField1
func createWebView() -> WKWebView {
let configuration = WKWebViewConfiguration()
let contentController = WKUserContentController()
// Получите текущий размер текста от Dynamic Type и установите его в качестве базового размера шрифта
let fontSize = UIFont.preferredFont(forTextStyle: .body).pointSize
let lineHeight = fontSize * 1.4
let script = "document.getElementsByTagName('body')[0].style.fontSize = '\(fontSize)px'; document.getElementsByTagName('body')[0].style.lineHeight = '\(lineHeight)px';"
let userScript = WKUserScript(source: script, injectionTime: .atDocumentEnd, forMainFrameOnly: true)
package com.eugene.klsk.ui.navigation.ext
import android.content.Intent
import android.util.SparseArray
import androidx.core.util.forEach
import androidx.core.util.set
import androidx.fragment.app.FragmentManager
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.navigation.NavController
private fun getWeekDate(): String {
val cal = Calendar.getInstance().apply {
set(Calendar.HOUR_OF_DAY, 0)
clear(Calendar.MINUTE)
clear(Calendar.SECOND)
clear(Calendar.MILLISECOND)
}
cal.set(Calendar.DAY_OF_WEEK, cal.firstDayOfWeek)
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?attr/appColorSurfaceBorder">
<item android:id="@android:id/background">
<shape>
<corners android:radius="4dp" />
<solid android:color="?attr/colorSurface" />
<stroke
android:width="1dp"
android:color="?attr/appColorSurfaceBorder" />
abstract class EpoxyKotlinHolder : EpoxyHolder() {
private lateinit var _view: View
override fun bindView(itemView: View) {
_view = itemView
}
protected fun <V : View> bind(id: Int): ReadOnlyProperty<EpoxyKotlinHolder, V> =
Lazy { holder: EpoxyKotlinHolder, prop ->