android.view.View#refreshDrawableState ( )源码实例Demo

下面列出了android.view.View#refreshDrawableState ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: Hangar   文件: Settings.java
protected void launchDonate() {
    final Donate donate = new Donate(this);
    donate.bindServiceConn();
    View mDonate = donate.getView(mContext);
    mDonate.refreshDrawableState();
    AlertDialog.Builder builder = new AlertDialog.Builder(Settings.this)
            .setTitle(R.string.donate_title)
            .setIcon(R.drawable.ic_logo)
            .setView(mDonate)
            .setPositiveButton(R.string.donate_accept_button, null);
    AlertDialog alert = builder.show();
    alert.setOnDismissListener(new AlertDialog.OnDismissListener() {
        public void onDismiss(DialogInterface dialog) {
            donate.unbindServiceConn();
        }
    });
    donate.setAlert(alert);
}
 
源代码2 项目: Mi-Band   文件: MainNormalActivity.java
private void thumbNailScaleAnimation(View view) {
    view.setDrawingCacheEnabled(true);
    view.setPressed(false);
    view.refreshDrawableState();
    Bitmap bitmap = view.getDrawingCache();
    ActivityOptionsCompat opts = ActivityOptionsCompat.makeThumbnailScaleUpAnimation(
            view, bitmap, 0, 0);
    // Request the activity be started, using the custom animation options.
    startActivity(new Intent(MainNormalActivity.this, AppsPreferencesActivity.class),
            opts.toBundle());
    view.setDrawingCacheEnabled(false);
}
 
源代码3 项目: Mi-Band   文件: MainServiceActivity.java
private void thumbNailScaleAnimation(View view) {
    view.setDrawingCacheEnabled(true);
    view.setPressed(false);
    view.refreshDrawableState();
    Bitmap bitmap = view.getDrawingCache();
    ActivityOptionsCompat opts = ActivityOptionsCompat.makeThumbnailScaleUpAnimation(
            view, bitmap, 0, 0);
    // Request the activity be started, using the custom animation options.
    startActivity(new Intent(MainServiceActivity.this, AppsPreferencesActivity.class),
            opts.toBundle());
    view.setDrawingCacheEnabled(false);
}
 
源代码4 项目: MyBlogDemo   文件: MainActivity.java
public void setOffset(View view, int offset, int minOffset) {

        offset = Math.max(minOffset, offset);
        if (offset > 105) {
            view.refreshDrawableState();
        }
        if (view.getTranslationY() != offset) {
            view.setTranslationY(offset);
            ViewCompat.postInvalidateOnAnimation(view);
        }
    }
 
源代码5 项目: Hangar   文件: Settings.java
protected void launchLicense() {
    License license = new License(this);
    View mLicense = license.getView();
    mLicense.refreshDrawableState();
    new AlertDialog.Builder(Settings.this)
            .setTitle(R.string.license_title)
            .setIcon(R.drawable.ic_logo)
            .setView(mLicense)
            .setPositiveButton(R.string.license_accept_button, null)
            .show();
}
 
源代码6 项目: Hangar   文件: Settings.java
static protected void launchContribute(Context context) {
    Contribute contribute = new Contribute(context);
    View mContribute = contribute.getView();
    mContribute.refreshDrawableState();
    new AlertDialog.Builder(context)
            .setTitle(R.string.contribute_title)
            .setIcon(R.drawable.ic_logo)
            .setView(mContribute)
            .setPositiveButton(R.string.contribute_accept_button, null)
            .show();
}
 
 方法所在类
 同类方法