Skip to content

Instantly share code, notes, and snippets.

View plusend's full-sized avatar
🇨🇳
长路漫漫,唯剑作伴

plusend plusend

🇨🇳
长路漫漫,唯剑作伴
View GitHub Profile
@plusend
plusend / CrashHandler.java
Created July 14, 2016 08:19
使用 CrashHandler 来获取应用的 crash 信息
package com.xxx.utils;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.lang.Thread.UncaughtExceptionHandler;
import java.text.SimpleDateFormat;
import java.util.Date;
@plusend
plusend / GlideImageGetter
Last active November 25, 2016 06:28 — 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;
@plusend
plusend / EmptyRecyclerView.java
Created December 18, 2016 06:36 — forked from ibabde/EmptyRecyclerView.java
RecyclerView with provosion to add empty view like list view. Displayed when the data set is empty
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.View;
public class EmptyRecyclerView extends RecyclerView {
@plusend
plusend / HanziToPinyin.java
Created April 5, 2017 02:05 — forked from D-clock/HanziToPinyin.java
从Android4.2.2原生系统中提取出来的汉字转换成拼音的方案,同时兼容国产ROM
/*
* Copyright (C) 2009 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
@plusend
plusend / .gitignore
Last active June 6, 2017 06:38
Android .gitignore
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
@plusend
plusend / SyncTaskManager.java
Last active August 31, 2017 06:53
SyncTaskManager 用于执行一些需要 *顺序执行* 的任务,比如先初始化离线文件,再联网更新离线文件等。
package com.plusend.taskmanager;
import android.os.Handler;
import android.os.HandlerThread;
public enum SyncTaskManager {
INSTANCE;
private final String TAG = "SyncTaskManager";