This file contains hidden or 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.sam016.vsflatomation.service.ble; | |
| import java.util.HashMap; | |
| import java.util.UUID; | |
| public class AllGattCharacteristics { | |
| private static HashMap<String, String> attributes = new HashMap(); | |
| static { | |
| attributes.put("00002a00-0000-1000-8000-00805f9b34fb", "Device Name"); |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <!-- | |
| # Material Design Dimensions | |
| These dimensions are provided as per Material Design Guidelines | |
| to adhere to a 8 dp baseline grid. (With the exception of the | |
| toolbar and notification bar.). | |
| ## References |
This file contains hidden or 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 net.warmwaffles.utils.concurrent; | |
| import java.util.concurrent.BlockingQueue; | |
| import java.util.concurrent.ThreadPoolExecutor; | |
| import java.util.concurrent.TimeUnit; | |
| import java.util.concurrent.locks.Condition; | |
| import java.util.concurrent.locks.ReentrantLock; | |
| /** | |
| * A light wrapper around the {@link ThreadPoolExecutor}. It allows for you to pause execution and |
This file contains hidden or 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
| /** | |
| * Our demo fragment | |
| */ | |
| public static class CircularRevealingFragment extends Fragment { | |
| OnFragmentTouched listener; | |
| public CircularRevealingFragment() { | |
| } |
This file contains hidden or 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.annotation.TargetApi; | |
| import android.content.Context; | |
| import android.os.Build; | |
| import android.text.SpannableStringBuilder; | |
| import android.text.method.LinkMovementMethod; | |
| import android.text.style.ClickableSpan; | |
| import android.util.AttributeSet; | |
| import android.view.View; | |
| import android.view.ViewTreeObserver; | |
| import android.widget.TextView; |
This file contains hidden or 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.novoda.example.MemoryLeaker; | |
| import android.os.Debug; | |
| import java.io.File; | |
| import java.io.IOException; | |
| public class HeapDumpingUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler { | |
| private static final String HPROF_DUMP_BASENAME = "LeakingApp.dalvik-hprof"; | |
| private final String dataDir; |
This file contains hidden or 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.support.v7.widget.LinearLayoutManager; | |
| import android.support.v7.widget.RecyclerView; | |
| public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener { | |
| public static String TAG = EndlessRecyclerOnScrollListener.class.getSimpleName(); | |
| private int previousTotal = 0; // The total number of items in the dataset after the last load | |
| private boolean loading = true; // True if we are still waiting for the last set of data to load. | |
| private int visibleThreshold = 5; // The minimum amount of items to have below your current scroll position before loading more. | |
| int firstVisibleItem, visibleItemCount, totalItemCount; |
This file contains hidden or 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 se.mobileapplab.datademo; | |
| import android.content.ContentValues; | |
| import android.content.Context; | |
| import android.database.Cursor; | |
| import android.database.sqlite.SQLiteDatabase; | |
| import android.database.sqlite.SQLiteOpenHelper; | |
| /** | |
| * Class that wraps the most common database operations. This example assumes you want a single table and data entity |