Java Code Examples for android.view.View#refreshDrawableState()
The following examples show how to use
android.view.View#refreshDrawableState() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: Hangar File: Settings.java License: GNU General Public License v3.0 | 6 votes |
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); }
Example 2
Source Project: Mi-Band File: MainNormalActivity.java License: GNU General Public License v2.0 | 5 votes |
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); }
Example 3
Source Project: Mi-Band File: MainServiceActivity.java License: GNU General Public License v2.0 | 5 votes |
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); }
Example 4
Source Project: MyBlogDemo File: MainActivity.java License: Apache License 2.0 | 5 votes |
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); } }
Example 5
Source Project: Hangar File: Settings.java License: GNU General Public License v3.0 | 5 votes |
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(); }
Example 6
Source Project: Hangar File: Settings.java License: GNU General Public License v3.0 | 5 votes |
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(); }