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 Foundation | |
@objc protocol ExtendedUITextFieldDelegate : UITextFieldDelegate { | |
@objc optional func extendedTextField(_ textField: UITextField, | |
shouldChangeCharactersIn range: NSRange, | |
replacementString string: String) -> String? | |
} | |
class TextFieldMultiDelegate : NSObject, UITextFieldDelegate { |
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.levelfillingvectordrawable | |
import android.content.res.Resources | |
import android.graphics.* | |
import android.graphics.drawable.DrawableWrapper | |
import android.graphics.drawable.VectorDrawable | |
import androidx.annotation.DrawableRes | |
import androidx.core.graphics.withSave | |
import com.sdsmdg.harjot.vectormaster.models.VectorModel | |
import java.lang.reflect.Field |
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 android.text.InputFilter | |
import android.text.Spanned | |
class NewlineLimitingInputFilter(val maxLines: Int) : InputFilter { | |
var monitor: LimitMonitor? = null | |
var numNewlines = 0 | |
override fun filter(source: CharSequence, start: Int, end: Int, dest: Spanned, dstart: Int, dend: Int): CharSequence? { | |
// subtract all newlines in dest range | |
for (char in dest.subSequence(dstart, dend)) { |
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
/** | |
* If isOptional, then position 0 is a "No response" item. | |
*/ | |
class EnumAdapter<DispEnum>(val context: Context, enumClass: Class<DispEnum>, | |
@IntegerRes var resource: Int = android.R.layout.simple_spinner_item, | |
@IntegerRes var dropDownResource: Int = android.R.layout.simple_spinner_dropdown_item, | |
val isOptional: Boolean = false) : | |
BaseAdapter() where DispEnum : Displayable, DispEnum : Enum<DispEnum> | |
{ | |
val inflater: LayoutInflater = LayoutInflater.from(context) |
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 android.content.Context | |
import android.support.annotation.IntegerRes | |
import android.util.Log | |
import android.view.* | |
import android.widget.BaseAdapter | |
import android.widget.TextView | |
class IntRangeAdapter(val context: Context, | |
@IntegerRes var resource: Int, |
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 android.content.Context | |
import android.graphics.Canvas | |
import android.graphics.drawable.Drawable | |
import android.util.AttributeSet | |
import android.widget.ImageView | |
import letstwinkle.com.twinkle.R | |
class BetterForegroundImageView : ImageView { | |
constructor(ctx: Context) : super(ctx) | |
constructor(ctx: Context, attrs: AttributeSet) : super(ctx, attrs) { |
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 letstwinkle.com.twinkle.util | |
import android.annotation.SuppressLint | |
import android.os.Bundle | |
import android.support.v4.os.ConfigurationCompat | |
import android.text.Spannable | |
import android.text.SpannableStringBuilder | |
import android.text.style.ImageSpan | |
import android.view.View | |
import android.view.ViewTreeObserver |
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
From 7ab87c7543deebb48a8c1ab482eb7cab524f2d29 Mon Sep 17 00:00:00 2001 | |
From: Julian <[email protected]> | |
Date: Thu, 17 Nov 2016 13:34:11 -0800 | |
Subject: [PATCH] destroying the mid zoom | |
--- | |
.../co/senab/photoview/DefaultOnDoubleTapListener.java | 17 ++++++++++++----- | |
.../java/uk/co/senab/photoview/PhotoViewAttacher.java | 16 +++++++++++----- | |
2 files changed, 23 insertions(+), 10 deletions(-) |
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 letstwinkle.com.twinkle.widget | |
import android.graphics.Bitmap | |
import android.view.View | |
import android.view.animation.* | |
import com.nostra13.universalimageloader.core.assist.LoadedFrom | |
import com.nostra13.universalimageloader.core.display.CircleBitmapDisplayer | |
import com.nostra13.universalimageloader.core.imageaware.ImageAware |