One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| # | |
| # This ProGuard configuration file illustrates how to process a program | |
| # library, such that it remains usable as a library. | |
| # Usage: | |
| # java -jar proguard.jar @library.pro | |
| # | |
| # Save the obfuscation mapping to a file, so we can de-obfuscate any stack | |
| # traces later on. Keep a fixed source file attribute and all line number | |
| # tables to get line numbers in the stack traces. |
| 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; |
| <!--- Provide a general summary of your changes in the Title above --> | |
| <!--- If there is no changelog entry, label this PR as trivial to bypass the Danger warning --> | |
| ## Description | |
| <!--- Describe your changes in detail --> | |
| ## Motivation and Context | |
| <!--- Why is this change required? What problem does it solve? --> |
| public class HashTable { | |
| private static int INITIAL_SIZE = 16; | |
| private HashEntry[] entries = new HashEntry[INITIAL_SIZE]; | |
| public void put(String key, String value) { | |
| int hash = getHash(key); | |
| final HashEntry hashEntry = new HashEntry(key, value); | |
| if(entries[hash] == null) { | |
| entries[hash] = hashEntry; | |
| } | |
| // If there is already an entry at current hash |
| Apache License | |
| Version 2.0, January 2004 | |
| http://www.apache.org/licenses/ | |
| TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | |
| 1. Definitions. | |
| "License" shall mean the terms and conditions for use, reproduction, | |
| and distribution as defined by Sections 1 through 9 of this document. |
| /* | |
| * Copyright (C) 2014 skyfish.jy@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 |
| public class MyApp extends Application { | |
| @Override | |
| public void onCreate() { | |
| TypefaceUtil.overrideFont(getApplicationContext(), "SERIF", "fonts/Roboto-Regular.ttf"); // font from assets: "assets/fonts/Roboto-Regular.ttf | |
| } | |
| } |