Skip to content

Instantly share code, notes, and snippets.

@dzwillpower
dzwillpower / UpdateGroupMembersAsyncTask.java
Created January 27, 2018 03:06
android sqlite 参数化查询
/*
* Copyright (C) 2016 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
@dzwillpower
dzwillpower / ContactAggregator2Test.java
Created July 13, 2017 09:10
ContentProviderOperation example
/*
* 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
/*
* Copyright (C) 2010 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
@dzwillpower
dzwillpower / gallery metadata.json
Created February 6, 2017 06:26
gallery meta data
/*
* Created by w4lle 2016 .
* Copyright (c) 2016 Boohee, Inc. All rights reserved.
*/
package com.boohee.myview;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
@dzwillpower
dzwillpower / LogcatUtils.java
Created July 25, 2016 02:09
android log分割类 默认的log 打印不完全所有的log
package com.ipanel.join.cq.vod.utils;
import java.util.ArrayList;
import android.util.Log;
public class LogcatUtils {
/**
* Divides a string into chunks of a given character size.
*
@dzwillpower
dzwillpower / webview destroy
Created June 8, 2016 06:29
destroy webbiew avoid memory leak
public void destroyAll() {
for (WebView webview : mWebViews) {
if (webview != null) {
webview.onPause();
webview.stopLoading();
webview.setWebViewClient(null);
webview.removeAllViews();
webview.clearHistory();
webview.clearCache(true);
webview.destroy();
@dzwillpower
dzwillpower / main_AndroidManifest.xml
Created May 20, 2016 06:42 — forked from hzqtc/main_AndroidManifest.xml
Android FlowLayout demo.
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="hzqtc.flowlayout"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19"/>
@dzwillpower
dzwillpower / TabLayout.java
Created March 25, 2016 04:55
TabLayout.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
public void apply(AlertController dialog) {
if (mCustomTitleView != null) {
dialog.setCustomTitle(mCustomTitleView);
} else {
if (mTitle != null) {
dialog.setTitle(mTitle);
}
if (mIcon != null) {
dialog.setIcon(mIcon);
}