Skip to content

Instantly share code, notes, and snippets.

View neworld's full-sized avatar
🇱🇹
Programming

Andrius Semionovas neworld

🇱🇹
Programming
  • Vinted
  • Vilnius, Lithuania
View GitHub Profile
#!/bin/sh
# Copy templates to Android Studio in default location
TMP_PATH=`pwd`
TEMPLATES_PATH="/Applications/Android Studio.app/Contents/plugins/android/lib/templates/other"
DIRS=`find $TMP_PATH -type d -maxdepth 1 -not -name '.*' -not -path $TMP_PATH`
for f in $DIRS
package com.vinted.extensions
import kotlin.reflect.KProperty
/**
* @author Andrius Semionovas
* @since 2015-10-16
*/
class LazyVar<T> internal constructor(initializer: () -> T) {
@neworld
neworld / howto.md
Last active September 15, 2020 11:32
How to make faster Android build without sacrificing new api lint check

Original solution sacrifices new api lint check.

Here my solution:

int minSdk = hasProperty('minSdk') ? minSdk.toInteger() : 16

apply plugin: 'com.android.application'

android {
 compileSdkVersion 23
@neworld
neworld / SearchViewFormatter.java
Last active April 14, 2020 17:08 — forked from ademar111190/SearchViewFormatter.java
Appcompat SearchView style formatter
package lt.mealdeal.android.utils;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.support.v7.widget.SearchView;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.style.ImageSpan;
import android.view.View;
import android.widget.ImageView;