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.pathshaderdrawable; | |
| import android.graphics.Bitmap; | |
| import android.graphics.Canvas; | |
| import android.graphics.Paint; | |
| import android.graphics.Path; | |
| import android.graphics.Rect; | |
| public class CircularDrawable extends PathDrawable { |
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
| private CategoryFragmentListener mListener = sCategoryListener; | |
| private static CategoryFragmentListener sCategoryListener = new CategoryFragmentListener() { | |
| @Override | |
| public void onLeafCategoryChosen() { | |
| } | |
| }; |
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
| Collections.sort(tenants, new ScopeComparator()); | |
| public class ScopeComparator implements Comparator<Scope> { | |
| @Override | |
| public int compare(Scope lhs, Scope rhs) { | |
| return lhs.getName().compareTo(rhs.getName()); | |
| } |
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
| Bitmap bitmap = ((BitmapDrawable)viewHolder.productImage.getDrawable()).getBitmap(); | |
| int [] colors = new int[1]; | |
| colors[0] = bitmap.getPixel(0, 0); | |
| Bitmap backgroundBitmap = Bitmap.createBitmap(colors, 1, 1, Bitmap.Config.ARGB_8888); | |
| viewHolder.productImage.setBackgroundDrawable(new BitmapDrawable(backgroundBitmap)); |
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 ReboundTranslateActivity extends Activity implements View.OnClickListener, SpringListener { | |
| private static double TENSION = 800; | |
| private static double DAMPER = 20; //friction | |
| private ImageView mImageToAnimate; | |
| private SpringSystem mSpringSystem; | |
| private Spring mSpring; | |
| private boolean mMovedUp = false; |
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 ReboundScaleActivity extends Activity implements View.OnTouchListener, SpringListener { | |
| private static double TENSION = 800; | |
| private static double DAMPER = 20; //friction | |
| private ImageView mImageToAnimate; | |
| private SpringSystem mSpringSystem; | |
| private Spring mSpring; | |
| @Override |
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.mozu.mozuandroidinstoreassistant.app.loaders; | |
| import com.mozu.api.MozuApiContext; | |
| import com.mozu.api.contracts.productadmin.LocationInventoryCollection; | |
| import com.mozu.api.contracts.productruntime.Product; | |
| import com.mozu.api.resources.commerce.catalog.admin.products.LocationInventoryResource; | |
| import rx.Observable; | |
| import rx.Subscriber; | |
| import rx.android.schedulers.AndroidSchedulers; |
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.mozu.mozuandroidinstoreassistant.app.loaders; | |
| import com.mozu.api.MozuApiContext; | |
| import com.mozu.api.contracts.productadmin.LocationInventoryCollection; | |
| import com.mozu.api.contracts.productruntime.Product; | |
| import com.mozu.api.resources.commerce.catalog.admin.products.LocationInventoryResource; | |
| import rx.Observable; | |
| import rx.Subscriber; | |
| import rx.android.schedulers.AndroidSchedulers; |
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.mozu.mozuandroidinstoreassistant.app.loaders; | |
| import com.mozu.api.MozuApiContext; | |
| import com.mozu.api.contracts.productadmin.LocationInventoryCollection; | |
| import com.mozu.api.contracts.productruntime.Product; | |
| import com.mozu.api.resources.commerce.catalog.admin.products.LocationInventoryResource; | |
| import rx.Observable; | |
| import rx.Subscriber; | |
| import rx.android.schedulers.AndroidSchedulers; |
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
| private ObjectAnimator animateRegularProgress(int finalProgress) { | |
| ObjectAnimator animation = ObjectAnimator.ofInt(regularProgressBar, PROPERTY_NAME, 0, finalProgress); | |
| animation.setDuration(ANIM_PROGRESS); | |
| animation.setInterpolator(new LinearInterpolator()); | |
| return animation; | |
| } | |
| private void animateTextProgress(float end, float total, ObjectAnimator barAnimationToCoupleTo) { |
OlderNewer