1.先选中Force https://... sources to be fetched using http://...
2. hosts里面添加:
203.208.46.146 dl.google.com 203.208.46.146 dl-ssl.google.com
203.208.46.146 dl.google.com 203.208.46.146 dl-ssl.google.com
##---------------Begin: proguard configuration for Gson ----------
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature
# For using GSON @Expose annotation
-keepattributes *Annotation*
# Gson specific classes
-keep class sun.misc.Unsafe { *; }
#-keep class com.google.gson.stream.** { *; }
# Application classes that will be serialized/deserialized over Gson
-keep class com.google.gson.examples.android.model.** { *; }
##---------------End: proguard configuration for Gson ----------
-keep class android.support.v7.widget.SearchView { *; }
private boolean checkStatusbar(){
Rect rect=new Rect();
getWindow().getDecorView().getWindowVisibleDisplayFrame(rect);
//屏幕高度还有别的办法得到,不赘述
return (rect.bottom-rect.top)
==getResources().getDisplayMetrics().heightPixels;
}
private int getStatusBarHeight() {
int result = 0;
int resourceId = getResources()
.getIdentifier("status_bar_height", "dimen", "android");
if (resourceId > 0) {
result = getResources().getDimensionPixelSize(resourceId);
}
return result;
}
<link href="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.css" rel="stylesheet" type="text/css"></link> <script src="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js" type="text/javascript">
public static void showDetailsOfApp(Context context,
String packageName) {
Intent intent = new Intent();
final int apiLevel = Build.VERSION.SDK_INT;
if (apiLevel >= 9) {
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
// .setData(Uri.fromParts("package", packageName, null));
.setData(Uri.parse("package:"+packageName));
} else {
final String appPkgName = (apiLevel == 8 ? "pkg"
: "com.android.settings.ApplicationPkgName");
intent.setAction(Intent.ACTION_VIEW)
.setClassName("com.android.settings",
"com.android.settings.InstalledAppDetails")
.putExtra(appPkgName, packageName);
}
context.startActivity(intent);
}