Skip to content

Instantly share code, notes, and snippets.

@codeversed
codeversed / build.gradle
Last active February 17, 2018 02:09
Jacoco Full Coverage Report - Based frome Google's android-architecture-components
apply plugin: 'com.android.application'
apply plugin: 'jacoco'
android {
defaultConfig {
...
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
@codeversed
codeversed / build.gradle
Created February 17, 2018 02:08
Jacoco Full Coverage Report
apply plugin: 'com.android.application'
apply plugin: 'jacoco'
android {
defaultConfig {
...
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
@codeversed
codeversed / Constants.java
Created July 19, 2017 12:47
AndroidForums node hierarchy HELL!
/**
Channels 3546 (not shown)
Devices 3543
Carriers 3544
Manufacturers 3663 (not used)
Featured Forums 26 (not shown)
Android News 3146
Android Lounge 12
VIP Area 148
@codeversed
codeversed / GlideImageGetter
Created July 16, 2017 13:51 — forked from donglua/GlideImageGetter
GlideImageGetter uses Glide Image Library to load GIFs/JPG/PNG in HTML <img> tags into TextView
import android.content.Context;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.text.Html;
import android.view.View;
import android.widget.TextView;
import com.bumptech.glide.Glide;
@codeversed
codeversed / SimpleFastScrollRecyclerView.java
Created July 27, 2016 19:29 — forked from teslacoil/SimpleFastScrollRecyclerView.java
Basic implementation of BaseRecyclerView from AOSP Launcher3 for use with listview style recyclerviews. In your adapter implement FastScrollTitleSectionProvider
/*
* Copyright (C) 2015 The Android Open Source Project
*
* 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
@codeversed
codeversed / RecyclerViewCursorAdapter.java
Last active May 20, 2016 17:34
RecyclerViewCursorAdapter and RecyclerViewCursorViewHolder
/**
* Adapter class that uses a CursorAdapter to display data in a RecyclerView.
*
*/
public abstract class RecyclerViewCursorAdapter<T extends RecyclerViewCursorViewHolder> extends RecyclerView.Adapter<T> {
/**
* The Context of the adapter.
*/
protected final Context mContext;
@codeversed
codeversed / PrefixedEditText.java
Created February 26, 2016 19:16 — forked from alexfu/PrefixedEditText.java
EditText with support for prefixes.
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.EditText;
/**
@codeversed
codeversed / DividerItemDecoration.java
Created January 15, 2016 07:08 — forked from alexfu/DividerItemDecoration.java
An ItemDecoration that draws dividers between items. Pulled from Android support demos.
/*
* Copyright (C) 2014 The Android Open Source Project
*
* 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
@codeversed
codeversed / Devices.java
Last active September 16, 2015 18:54
Helper class to get the consumer friendly device name. Upvote http://stackoverflow.com/a/27836910/1048340
/*
* Copyright (C) 2015 Jared Rummler <jared.rummler@gmail.com>
*
* 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
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management