I hereby claim:
- I am rezaiyan on github.
- I am rezaiyan (https://keybase.io/rezaiyan) on keybase.
- I have a public key ASCIL3cT6Mr4wkhTVwCcwM3APTtPGesOSSBd3sMDra_Znwo
To claim this, I am signing this object:
| public static String formatPrice(double priceAsDouble) { | |
| NumberFormat formatter = NumberFormat.getInstance(); | |
| if (Math.round(priceAsDouble * 100) % 100 == 0) { | |
| formatter.setMaximumFractionDigits(0); | |
| } | |
| return formatter.format(priceAsDouble); | |
| } |
| package com.parvazyab.android.common.adapter; | |
| import android.util.Log; | |
| import com.google.gson.JsonSyntaxException; | |
| import java.io.IOException; | |
| import java.lang.annotation.Annotation; | |
| import okhttp3.ResponseBody; |
| package com.ott.common.di; | |
| /** | |
| * @author rezaiyan (alirezaiyann@gmail.com) | |
| * @since 6:29 PM. | |
| */ | |
| import android.support.annotation.NonNull; |
| package me.alirezaiyan.gist; | |
| import android.content.Context; | |
| import android.support.v7.widget.LinearLayoutManager; | |
| import android.util.AttributeSet; | |
| /** | |
| * @author rezaiyan (alirezaiyann@gmail.com) | |
| * @since 3/13/18 21:42. | |
| * |
I hereby claim:
To claim this, I am signing this object:
| public abstract class AlertBuilder { | |
| public abstract void ok(); | |
| public AlertDialog.Builder create(Context context, String message) { | |
| final AlertDialog.Builder builder; | |
| builder = new AlertDialog.Builder(context); | |
| builder.setMessage(message) | |
| .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() { |
| private int lastPosition = 0; | |
| private void setAnimation(View viewToAnimate, int position) { | |
| if (position > lastPosition) { | |
| Animation animation = AnimationUtils.loadAnimation(context, R.anim.fadei_list); | |
| viewToAnimate.startAnimation(animation); | |
| lastPosition = position; | |
| } | |
| } |
| Glide.with(context).load(Api.getPosterPath(holder.movie.getPosterPath())) | |
| .asBitmap() | |
| .diskCacheStrategy(DiskCacheStrategy.RESULT) | |
| .into(new BitmapImageViewTarget(holder.poster) | |
| { | |
| @Override | |
| public void onResourceReady(Bitmap bitmap, GlideAnimation anim) | |
| { | |
| super.onResourceReady(bitmap, anim); |
| //Old endless recyclerview methodology | |
| recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() { | |
| @Override | |
| public void onScrolled(RecyclerView recyclerView, int dx, int dy) { | |
| super.onScrolled(recyclerView, dx, dy); | |
| visibleItemCount = recyclerView.getChildCount(); | |
| totalItemCount = gridLayoutManager.getItemCount(); | |
| firstVisibleItem = gridLayoutManager.findFirstVisibleItemPosition(); | |
| if (loading) { |