Skip to content

Instantly share code, notes, and snippets.

@huang5556019
huang5556019 / 自己总结的iOS、mac开源项目及库
Created September 18, 2015 07:28
自己总结的iOS、mac开源项目及库
# TimLiu-iOS
========
自己总结的iOS、mac开源项目及库。 github排名 [https://github.com/trending](https://github.com/trending),github搜索:[https://github.com/search](https://github.com/search)
### 目录
- [UI](#UI)
- [下拉刷新](#下拉刷新)
- [模糊效果](#模糊效果)
- [AutoLayout](#AutoLayout)
- [富文本](#富文本)
@pyricau
pyricau / IMMLeaks.java
Last active June 5, 2022 22:46
"Fix" for InputMethodManager leaking the last focused view: https://code.google.com/p/android/issues/detail?id=171190
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.ContextWrapper;
import android.os.Bundle;
import android.os.Looper;
import android.os.MessageQueue;
import android.util.Log;
import android.view.View;
import android.view.ViewTreeObserver;
@ssinss
ssinss / EndlessRecyclerOnScrollListener.java
Last active January 19, 2024 08:52
Endless RecyclerView OnScrollListener
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;