Skip to content

Instantly share code, notes, and snippets.

@ppav
ppav / Binding.kt
Last active September 26, 2018 12:13
View Binding
import android.support.v4.app.Fragment
import android.support.v7.app.AppCompatDialog
import android.view.View
import java.util.*
import kotlin.properties.ReadOnlyProperty
import kotlin.reflect.KProperty
fun <V : View> Fragment.bindView(id: Int)
: ReadOnlyProperty<Fragment, V> = required(id, viewFinder)
/**
* Created by ppav ▀▄▀▄
*/
abstract class SingleOnClickListener : View.OnClickListener {
private var singleClickFlag = true
private val singleClickRunnable = Runnable { singleClickFlag = true }
override fun onClick(v: View) {
/*
* Copyright (C) 2017 The Android Open Source Project & Erik Huizinga
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
package productmeister.com.productmeister.view;
import android.annotation.TargetApi;
import android.os.Build;
import android.support.design.widget.AppBarLayout;
import android.support.v4.view.ViewCompat;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
@ppav
ppav / build.gradle
Created August 1, 2019 12:39 — forked from dhei/build.gradle
Use environment variables and local.properties to store Bintray publishing secrets
allprojects {
bintray {
user = bintrayUser
key = bintrayKey
configurations = ['archives']
publish = true
pkg {
repo = bintrayRepo
name = "your-package-name"