This file contains 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 PermissionsManager( | |
private val application: Application | |
) { | |
private val mainThreadScope = CoroutineScope(Job() + Dispatchers.Main) | |
private var questionHandler: QuestionHandler? = null | |
private var requestLauncher: ActivityResultLauncher<Array<String>>? = null |
This file contains 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 MainActivity : AppCompatActivity(R.layout.activity_main) { | |
@Inject lateinit var fragmentFactory: FragmentFactory | |
override fun onCreate(savedInstanceState: Bundle?) { | |
DaggerActivityComponent | |
.factory() | |
.create() | |
.inject(this) |
This file contains 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
/* | |
* Класс специфичный для конкретной фичи, лежит в пакете screen некоего фиче модуля. | |
*/ | |
class FeatureActivity : AppCompatActivity() { | |
@Inject | |
lateinit var viewModelFactory: ViewModelProvider.Factory | |
private val viewModel: FeatureViewModel1 by viewModels { viewModelFactory } | |
} |
This file contains 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 one.xcorp.myeye.core.utils; | |
import android.graphics.Color; | |
import android.graphics.PorterDuff; | |
import android.graphics.PorterDuffColorFilter; | |
import android.graphics.drawable.Drawable; | |
import android.support.annotation.ColorInt; | |
public class Colorize { |
This file contains 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.example.android.basictransition | |
import android.animation.Animator | |
import android.animation.AnimatorListenerAdapter | |
import android.animation.ObjectAnimator | |
import android.animation.PropertyValuesHolder.ofFloat | |
import android.content.Context | |
import android.transition.Transition | |
import android.transition.TransitionValues | |
import android.util.AttributeSet |
This file contains 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.example.android.basictransition | |
import android.content.Context | |
import android.graphics.Canvas | |
import android.graphics.Color | |
import android.graphics.Paint | |
import android.graphics.Rect | |
import android.support.annotation.ColorInt | |
import android.util.AttributeSet | |
import android.util.TypedValue |
This file contains 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.example.android.basictransition | |
import android.animation.Animator | |
import android.animation.AnimatorListenerAdapter | |
import android.animation.ValueAnimator | |
import android.content.Context | |
import android.content.res.Resources | |
import android.graphics.Bitmap | |
import android.graphics.Canvas | |
import android.graphics.Rect |
This file contains 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 one.xcorp.widget | |
import android.animation.ValueAnimator | |
import android.content.Context | |
import android.util.AttributeSet | |
import android.view.View | |
import android.view.ViewGroup.LayoutParams.MATCH_PARENT | |
import android.view.ViewGroup.LayoutParams.WRAP_CONTENT | |
import one.xcorp.widget.R | |
import kotlin.properties.Delegates.observable |
This file contains 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
Подсчет колличества строк в файлах: find . -name *.kt -exec wc -l {} + |
This file contains 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.example.overlay; | |
public class Entry { | |
private final int imageResId; | |
private final String title; | |
public Entry( int imageResId, String title ) { | |
this.imageResId = imageResId; |
NewerOlder