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 org.example | |
import net.bytebuddy.ByteBuddy | |
import net.bytebuddy.dynamic.DynamicType | |
import net.bytebuddy.implementation.FixedValue | |
import net.bytebuddy.matcher.ElementMatchers | |
import org.junit.jupiter.api.Test | |
import java.net.Socket | |
import kotlin.reflect.KFunction | |
import kotlin.reflect.jvm.javaMethod |
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 org.example | |
import net.bytebuddy.ByteBuddy | |
import net.bytebuddy.description.modifier.Visibility | |
import net.bytebuddy.dynamic.scaffold.subclass.ConstructorStrategy | |
import net.bytebuddy.implementation.FieldAccessor | |
import net.bytebuddy.implementation.MethodCall | |
import net.bytebuddy.implementation.MethodDelegation | |
import net.bytebuddy.implementation.bind.annotation.FieldValue | |
import net.bytebuddy.matcher.ElementMatchers |
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
<?xml version="1.0" encoding="utf-8"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:width="3dp" android:height="20dp" android:left="10dp"> | |
<rotate android:fromDegrees="-30"> | |
<shape android:shape="rectangle"> | |
<solid android:color="#3DDC84" /> | |
<size android:width="48dp" android:height="24dp" /> | |
<corners android:topLeftRadius="24dp" android:topRightRadius="24dp" /> | |
</shape> | |
</rotate> |
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
cmake_minimum_required(VERSION 3.6.0) | |
add_library(native_app_glue STATIC | |
${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c) | |
target_include_directories(native_app_glue PUBLIC | |
${ANDROID_NDK}/sources/android/native_app_glue) | |
find_library(log-lib | |
log) |
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
import com.fasterxml.jackson.databind.DeserializationFeature | |
import com.fasterxml.jackson.databind.ObjectMapper | |
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper | |
import okhttp3.HttpUrl | |
import okhttp3.OkHttpClient | |
import okhttp3.Request | |
import java.lang.reflect.Method | |
import java.lang.reflect.ParameterizedType | |
import java.lang.reflect.Proxy |
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
import net.sf.cglib.proxy.Enhancer | |
import net.sf.cglib.proxy.MethodInterceptor | |
import net.sf.cglib.proxy.MethodProxy | |
import org.hamcrest.core.Is.`is` | |
import org.junit.Assert.assertThat | |
import org.junit.Test | |
import java.lang.reflect.Method | |
import java.net.Socket | |
inline fun <reified T> createMock(interceptor: MethodInterceptor) = Enhancer().apply { |
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 io.aoriani.simplebutterknife | |
import android.support.v7.app.AppCompatActivity | |
import android.os.Bundle | |
import android.view.View | |
import android.widget.TextView | |
import kotlin.reflect.KClass | |
import kotlin.reflect.KFunction | |
import kotlin.reflect.full.declaredMemberFunctions | |
import kotlin.reflect.jvm.jvmErasure |
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 io.aoriani.simplebutterknife | |
import android.os.Bundle | |
import android.support.annotation.IdRes | |
import android.support.v7.app.AppCompatActivity | |
import android.view.View | |
import android.widget.Button | |
import android.widget.TextView | |
import kotlin.reflect.KMutableProperty1 | |
import kotlin.reflect.full.declaredMemberProperties |
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
@SuppressLint("NewApi") | |
@BindingAdapter("android:tint") | |
public static void setTintCompat(ImageView imageView, @ColorInt int color) { | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { | |
imageView.setImageTintList(android.databinding.adapters.Converters.convertColorToColorStateList(color)); | |
} else { | |
final Drawable originalDrawable = imageView.getDrawable(); | |
if (originalDrawable instanceof VectorDrawableCompat) { | |
VectorDrawableCompat vectorDrawableCompat = (VectorDrawableCompat) originalDrawable; | |
vectorDrawableCompat.setTint(color); |
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
// | |
// ViewController.swift | |
// Animations | |
// | |
// Created by Andre Oriani on 1/16/17. | |
// Copyright © 2017 Orion. All rights reserved. | |
// | |
import UIKit |
NewerOlder