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 class BaseActivity extends AppCompatActivity { | |
private int VIEW_TAG_CLICK = 2<<24; | |
protected boolean isFastDoubleClick(View view) { | |
Long lastClickTime = (Long) view.getTag(VIEW_TAG_CLICK); | |
if (null == lastClickTime) { | |
lastClickTime = 0L; | |
} | |
long time = System.currentTimeMillis(); | |
view.setTag(VIEW_TAG_CLICK, time); |
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
<android.support.v7.widget.Toolbar | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:fitsSystemWindows="true" | |
android:layout_height="?attr/actionBarSize" | |
style="@style/ToolbarStyle" | |
android:contentInsetLeft="0dp" | |
android:contentInsetStart="0dp" | |
app:contentInsetLeft="0dp" |
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.drawable.Drawable; | |
import android.graphics.PorterDuff; | |
import android.support.annotation.ColorInt; | |
import android.support.v4.graphics.drawable.DrawableCompat; | |
import android.widget.ImageView; | |
public class DrawableUtils { | |
/** | |
* 以SRC_ATOP的方式改变imageview图片的颜色 |
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"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > | |
<!-- 设置整个屏幕背景为白色 --> | |
<item > | |
<color android:color="@color/white"/> | |
</item> | |
<!-- 中间logo --> | |
<item > | |
<bitmap |