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.os.Looper; | |
import android.os.MessageQueue; | |
import android.util.Log; | |
import android.util.Printer; | |
public class ANRDetector { | |
public static final String TAG = "ANRDetector"; | |
private final Looper looper; | |
private final MessageQueue queue; |
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
buildTypes { | |
release { | |
minifyEnabled true | |
consumerProguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
} | |
} |
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
# -*- coding: utf-8 -*- | |
from com.android.monkeyrunner import MonkeyRunner as mr,MonkeyDevice as md | |
# Imports the monkeyrunner modules used by this program | |
# usage : $monkeyrunner main.py | |
# 下面的坐标是针对 1080 x 1920 的设备的 如果是其他分辨率的设备请自行调整 | |
__author__ = 'banxi' | |
# Connects to the current device, returning a MonkeyDevice object | |
print("Waiting for connect...") | |
device = mr.waitForConnection() |
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
Don't speak English well. Thank you for your patience. | |
It's functions xml file. | |
<mapper namespace="org.jacknie.mybatis.Functions"> | |
<sql id="isBlank"> | |
<bind name="isBlank" value=":[@org.apache.commons.lang3.StringUtils@isBlank(#this)]" /> | |
</sql> | |
<sql id="sysout"> | |
<bind name="sysout" value=":[@System@out.println(#this)]" /> | |
</sql> |
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.content.Context; | |
import android.content.res.TypedArray; | |
import android.util.AttributeSet; | |
import android.support.v7.widget.RecyclerView; | |
import android.support.v7.widget.LinearLayoutManager; | |
import android.view.View; | |
import android.graphics.Rect; | |
import android.graphics.drawable.Drawable; | |
import android.graphics.Canvas; |
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.tabTextAppearance | |
<style name="YourTextAppearance" parent="TextAppearance.AppCompat.Button"> | |
<item name="android:textSize">20sp</item> | |
... | |
</style> | |
<com.google.android.material.tabs.TabLayout | |
android:id="@+id/tabLayout" | |
android:layout_width="match_parent" |
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.example.view; | |
import android.animation.Animator; | |
import android.support.v7.widget.LinearLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
import android.support.v7.widget.RecyclerView.Adapter; | |
import android.support.v7.widget.RecyclerView.ViewHolder; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.view.animation.Interpolator; |
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
/* DO NOT EDIT THIS FILE - it is machine generated */ | |
#include <jni.h> | |
/* Header for class com_example_gist_SignatureChecker */ | |
#ifndef _Included_com_example_gist_SignatureChecker | |
#define _Included_com_example_gist_SignatureChecker | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
/* |
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
/** | |
* Scale to center top or scale to center bottom | |
* | |
* @author sromku | |
*/ | |
public class ImageScaleView extends ImageView { | |
private MatrixCropType mMatrixType = MatrixCropType.TOP_CENTER; // default | |
private enum MatrixCropType { |
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 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 |
OlderNewer