Skip to content

Instantly share code, notes, and snippets.

@suclike
suclike / README.md
Created October 12, 2015 13:26 — forked from dnozay/_Jenkins+Script+Console.md
jenkins groovy scripts collection.
@suclike
suclike / listOfBranches.groovy
Last active October 19, 2015 09:13
Get list of branches within groovy on Jenkins. /** On first run, text field should be set as 'Editable' and branch name e.g. 'master' should be entered manually; then list will be fetched **/
import jenkins.model.*
import jenkins.model.Jenkins
import hudson.model.User
import hudson.security.Permission
import hudson.EnvVars
BUILD_JOB_NAME = "APK_TEST"
def jobWorkspace (String jobName) {
@suclike
suclike / build.gradle
Last active October 19, 2015 09:11
Gradle file for Android that contains code coverage and code checkers enabled
/**
* Android code analysis and reporting tools
*/
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
@suclike
suclike / gist:eca6a587abfb187a310d
Created October 21, 2015 17:10 — forked from bolhoso/gist:8403087
An Android Espresso IdlingResource to monitor Volley requests (bot not working yet..)
public final class VolleyIdlingResource implements IdlingResource {
private static final String TAG = "VolleyIdlingResource";
private final String resourceName;
// written from main thread, read from any thread.
private volatile ResourceCallback resourceCallback;
private Field mCurrentRequests;
private RequestQueue mVolleyRequestQueue;
@suclike
suclike / colors.xml
Created October 25, 2015 15:28
Material Design Color Palette Colors.xml Resource file for Android
<?xml version="1.0" encoding="utf-8"?>
<!--
Google Material Design Color Palette for Android http://www.google.com/design/spec/style/color.html#color-ui-color-palette
Spreadsheet used to create this reosurce - http://bit.ly/mdcolor_spreadsheet
Link to this colors.xml resource file - http://bit.ly/mdcolorsxml
Harshad Kale
https://github.com/kalehv
harshad.kale@gmail.com
@suclike
suclike / TODO.md
Created November 2, 2015 11:25
Colorize

#TODO

  • Color text menu items as well as coloring icon's in the menu
@suclike
suclike / IconizedMenu.java
Created November 11, 2015 18:38 — forked from mediavrog/IconizedMenu.java
Android Compatibility popup menu with icons (requires support library v7)
package com.vuzz.snapdish.ui;
import android.content.Context;
import android.support.v7.internal.view.SupportMenuInflater;
import android.support.v7.internal.view.menu.MenuBuilder;
import android.support.v7.internal.view.menu.MenuPopupHelper;
import android.support.v7.internal.view.menu.MenuPresenter;
import android.support.v7.internal.view.menu.SubMenuBuilder;
import android.view.Menu;
import android.view.MenuInflater;
@suclike
suclike / Android Lollipop Widget Tinting Guide
Created December 3, 2015 19:37 — forked from seanKenkeremath/Android Lollipop Widget Tinting Guide
How base colors in Lollipop apply to different UI elements
Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21. To use the support version of these attributes, remove the android namespace. For instance, "android:colorControlNormal" becomes "colorControlNormal". These attributes will be propagated to their corresponding attributes within the android namespace for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix.
All Clickable Views:
-----------
* ripple effect (Lollipop only) -- "colorControlHighlight"
Status Bar:
------------
* background (Lollipop only) - "colorPrimaryDark"
@suclike
suclike / Snackbars.java
Created December 4, 2015 11:22 — forked from TheFinestArtist/Snackbars.java
Wrapper class to customise android.support.design snack bar!
/**
* Snackbars
*
* @author The Finest Artist
*/
public class Snackbars {
private Snackbars() {
}
import android.content.Context;
import android.graphics.Matrix;
import android.util.AttributeSet;
import android.widget.ImageView;
public class TopImageCrop extends ImageView {