This file contains 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.netease.cc.mgsdk.util; | |
import java.lang.reflect.Field; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.view.View; | |
public class IdentifierUtil { | |
/** |
This file contains 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.Canvas; | |
import android.graphics.Paint; | |
import android.graphics.Rect; | |
import android.graphics.drawable.Drawable; | |
import android.text.style.ImageSpan; | |
/** | |
* 垂直居中的ImageSpan | |
* | |
*/ |
This file contains 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.netease.cc.dhsdkcore.utils; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; | |
import android.support.v4.content.LocalBroadcastManager; | |
import android.widget.Toast; |
This file contains 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) 2014 Freddie (Musenkishi) Lust-Hed | |
* | |
* 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 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.brucetoo.wifip2p; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.IntentFilter; | |
import android.net.NetworkInfo; | |
import android.net.wifi.WpsInfo; | |
import android.net.wifi.p2p.WifiP2pConfig; | |
import android.net.wifi.p2p.WifiP2pDevice; |
This file contains 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
private void exitFragment(View v) { | |
//position click detail view in viewpager | |
int position = (int) v.getTag(); | |
//go back to pre layout'position of this detail view(mean original view) | |
runExitAnimation(v); | |
((PhotoView)v).animateTo(imageInfos.get(position), new Runnable() { | |
@Override | |
public void run() { | |
if (!ViewPagerFragment.this.isResumed()) {//fragment be destroyed or onPaused. | |
return; |
This file contains 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.brucetoo.androidnotes.tools; | |
import android.os.Handler; | |
import android.os.Message; | |
import java.lang.ref.WeakReference; | |
/** | |
* Created by Bruce Too | |
* On 2018/10/26. |
This file contains 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
/** | |
* H 色相 就是指颜色 | |
* S 饱和度 0 - 1取值 | |
* V 亮度 0 - 1 | |
* / | |
private static int darkenColor(int color) { | |
float[] hsv = new float[3]; | |
Color.colorToHSV(color, hsv); | |
hsv[2] *= 0.9f; |
This file contains 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
1.保存唯一唯一的包名 | |
-keepattributes InnerClasses,... | |
-keeppackagenames ** | |
2.防止有些资源没被混淆 | |
#-dontshrink | |
3.去掉抛出异常时保留代码行数 | |
#-keepattributes SourceFile,LineNumberTable |
This file contains 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.brucetoo.expandrecyclerview.reyclerview; | |
import android.graphics.Canvas; | |
import android.graphics.Rect; | |
import android.graphics.drawable.Drawable; | |
import android.support.v7.widget.LinearLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.View; | |
/** |
NewerOlder