This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.annotation.SuppressLint | |
| import android.content.Context | |
| import android.util.AttributeSet | |
| import android.view.View | |
| import androidx.appcompat.view.ContextThemeWrapper | |
| import androidx.compose.runtime.Composable | |
| import androidx.compose.runtime.CompositionContext | |
| import androidx.compose.runtime.DisposableEffect | |
| import androidx.compose.runtime.getValue | |
| import androidx.compose.runtime.mutableStateOf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <network-security-config> | |
| <base-config> | |
| <trust-anchors> | |
| <certificates src="system" /> | |
| <certificates src="user" /> | |
| </trust-anchors> | |
| </base-config> | |
| </network-security-config> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { | |
| return AccountMenuBinding.inflate(inflater, container, false).also { binding = it }.root | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { | |
| return AccountMenuBinding.inflate(inflater, container, false).also { binding = it }.root | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MyCustomView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : | |
| View(context, attrs, defStyleAttr) { | |
| private val viewModel = MyViewModel() | |
| private val viewLifecycleOwner = ViewLifecycleOwner() | |
| init { | |
| viewModel.data.observe(viewLifecycleOwner) { data -> | |
| // ... | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.your.package | |
| import android.app.Dialog | |
| import android.os.Bundle | |
| import com.your.package.R | |
| import com.google.android.material.bottomsheet.BottomSheetDialog | |
| import com.google.android.material.bottomsheet.BottomSheetDialogFragment | |
| /** | |
| * BottomSheetDialog fragment that uses a custom |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| project_dir=$1 | |
| cd $project_dir | |
| stats_for_month(){ | |
| java_files="$(find \. -mindepth 1 -type f -name '*.java' -print)" | |
| kotlin_files="$(find \. -mindepth 1 -type f -name '*.kt' -print)" | |
| java_files_nr=$(echo "$java_files" | wc -l) | |
| kotlin_files_nr=$(echo "$kotlin_files" | wc -l) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?><!--suppress AndroidDomInspection --> | |
| <animated-vector xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:aapt="http://schemas.android.com/aapt" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| tools:ignore="MissingPrefix,NewApi" | |
| tools:targetApi="lollipop"> | |
| <aapt:attr name="android:drawable"> | |
| <vector |