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.graphics.*; | |
import com.squareup.picasso.Transformation; | |
/** | |
* Transforms an image into a circle representation. Such as a avatar. | |
*/ | |
public class CircularTransformation implements Transformation | |
{ | |
int radius = 10; |
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
/** | |
* Blur a bitmap by specified radius | |
* @param context | |
* @param src | |
* @param radius | |
* @return | |
*/ | |
public static Bitmap blurBitmap(Context context, Bitmap src, float radius) | |
throws RSIllegalArgumentException { | |
if (radius <= 0f) { |
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
public static List<Track> getLocalSongs(Context context, int pageIndex, int pageSize) { | |
long[] audioId; | |
Playlist playlist; | |
List<Track> trackList = new ArrayList<Track>(); | |
String[] projection = new String[] { MediaStore.Audio.Media._ID, }; | |
Uri uri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI | |
.buildUpon() | |
.appendQueryParameter(QUERY_PARAMETER_LIMIT, String.valueOf(pageSize)) | |
.appendQueryParameter(QUERY_PARAMETER_OFFSET, | |
String.valueOf((pageIndex - 1) * pageSize)).build(); |
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
<attr name="oppoPagerTabStripStyle" format="reference" /> | |
<declare-styleable name="OppoPagerTabStrip"> | |
<attr name="pagerTitle" format="reference" /> | |
<attr name="pagerTitleSize" format="reference|dimension" /> | |
<attr name="pagerTitleColor" format="reference|color" /> | |
<attr name="pagerTitleColorHighlight" format="reference|color" /> | |
<attr name="textPadding" format="reference|dimension" /> | |
<attr name="bottomLine" format="reference|color" /> | |
<attr name="focusLine" format="reference|color" /> |
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
public void apply(AlertController dialog) { | |
if (mCustomTitleView != null) { | |
dialog.setCustomTitle(mCustomTitleView); | |
} else { | |
if (mTitle != null) { | |
dialog.setTitle(mTitle); | |
} | |
if (mIcon != null) { | |
dialog.setIcon(mIcon); | |
} |
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
/* | |
* 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 |
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"?> | |
<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"/> |
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
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(); |
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.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. | |
* |
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
/* | |
* 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; |