tags | ||
---|---|---|
|
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.content.Context; | |
import android.util.AttributeSet; | |
import android.util.Log; | |
import android.view.MotionEvent; | |
import android.view.View; | |
import android.view.ViewConfiguration; | |
import android.view.ViewParent; | |
import android.view.ViewTreeObserver; | |
import android.widget.FrameLayout; |
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
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 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
launch(UI) { | |
editText.onTextChanged() | |
.debounce(1, TimeUnit.SECONDS) | |
.consumeEach { | |
Log.d("DebounceTest", "value: $it") | |
} | |
} | |
} | |
fun EditText.onTextChanged(): ReceiveChannel<String> = |
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
buildTypes { | |
release { | |
minifyEnabled true | |
consumerProguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
} | |
} |
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
# -*- 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 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
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=":[@[email protected](#this)]" /> | |
</sql> |
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.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 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
/** | |
* 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 { |
NewerOlder