Skip to content

Instantly share code, notes, and snippets.

@codeversed
codeversed / build.gradle
Last active Feb 17, 2018
Jacoco Full Coverage Report - Based frome Google's android-architecture-components
View build.gradle
apply plugin: 'com.android.application'
apply plugin: 'jacoco'
android {
defaultConfig {
...
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
@codeversed
codeversed / build.gradle
Created Feb 17, 2018
Jacoco Full Coverage Report
View build.gradle
apply plugin: 'com.android.application'
apply plugin: 'jacoco'
android {
defaultConfig {
...
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
@codeversed
codeversed / Constants.java
Created Jul 19, 2017
AndroidForums node hierarchy HELL!
View Constants.java
/**
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 Jul 16, 2017 — forked from donglua/GlideImageGetter
GlideImageGetter uses Glide Image Library to load GIFs/JPG/PNG in HTML <img> tags into TextView
View GlideImageGetter
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 Jul 27, 2016 — forked from teslacoil/SimpleFastScrollRecyclerView.java
Basic implementation of BaseRecyclerView from AOSP Launcher3 for use with listview style recyclerviews. In your adapter implement FastScrollTitleSectionProvider
View SimpleFastScrollRecyclerView.java
/*
* 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
RecyclerViewCursorAdapter and RecyclerViewCursorViewHolder
View RecyclerViewCursorAdapter.java
/**
* 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 Feb 26, 2016 — forked from alexfu/PrefixedEditText.java
EditText with support for prefixes.
View PrefixedEditText.java
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 Jan 15, 2016 — forked from alexfu/DividerItemDecoration.java
An ItemDecoration that draws dividers between items. Pulled from Android support demos.
View DividerItemDecoration.java
/*
* 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 Sep 16, 2015
Helper class to get the consumer friendly device name. Upvote http://stackoverflow.com/a/27836910/1048340
View Devices.java
/*
* 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
View .bash_profile
# ---------------------------------------------------------------------------
#
# 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