Skip to content

Instantly share code, notes, and snippets.

View krossovochkin's full-sized avatar
👌

Vasya Drobushkov krossovochkin

👌
View GitHub Profile
class MyTextView
@JvmOverloads
constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : AppCompatTextView(context, attrs, defStyleAttr) {
fun setTheme(theme: ThemeManager.Theme) {
setTextColor(
@krossovochkin
krossovochkin / MainActivity.kt
Created January 18, 2020 12:07
Theme_1_setup
private fun setTheme(theme: Theme) {
if (imageView.isVisible) {
return
}
val w = container.measuredWidth
val h = container.measuredHeight
val bitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888)
val canvas = Canvas(bitmap)
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
tools:ignore="HardcodedText">
<ImageView
android:id="@+id/imageView"
package com.krossovochkin.butterknifetest
import io.reactivex.Observable
import io.reactivex.subjects.BehaviorSubject
import org.junit.Test
class RxUnitTest {
/* Base tests */
.class public final Lcom/krossovochkin/butterknifetest/ExtensionsActivity;
.super Landroidx/appcompat/app/c;
# instance fields
.field private j:Ljava/util/HashMap;
# direct methods
.method public constructor <init>()V
.class public final Lcom/krossovochkin/butterknifetest/ExtensionsActivity;
.super Landroidx/appcompat/app/c;
# instance fields
.field private j:Ljava/util/HashMap;
# direct methods
.method public constructor <init>()V
public final class ExtensionsActivity extends AppCompatActivity {
private SparseArray _$_findViewCache;
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(-1300009);
this.update();
}
private final void update() {
import kotlinx.android.synthetic.main.activity_main.*
class ExtensionsActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
update()
}
public final class ButterKnifeAcivity_ViewBinding implements Unbinder {
private ButterKnifeAcivity target;
@UiThread
public ButterKnifeAcivity_ViewBinding(ButterKnifeAcivity target) {
this(target, target.getWindow().getDecorView());
}
@UiThread
public ButterKnifeAcivity_ViewBinding(ButterKnifeAcivity target, View source) {
public final class ButterKnifeAcivity extends AppCompatActivity {
@BindView(-1000050)
@NotNull
public TextView textView;
@NotNull
public final TextView getTextView() {
TextView var10000 = this.textView;
if (this.textView == null) {
Intrinsics.throwUninitializedPropertyAccessException("textView");