// Path: app/src/main/java/org/polaric/cluttr/dialogs/ActionMessageDialog.java
// public class ActionMessageDialog extends Dialog {
//     @BindView(R.id.action_dialog_toolbar) Toolbar toolbar;
//     @BindView(R.id.action_dialog_message) TextView msg;
//     @BindView(R.id.action_dialog_ok) Button ok;
//     @BindView(R.id.action_dialog_cancel) Button cancel;
// 
//     private String buttonText=null, negativeText, titleText;
//     private Spanned msgText;
// 
//     private OnPositiveListener listener;
// 
//     public ActionMessageDialog(Context context) {
//         super(context);
//     }
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         requestWindowFeature(Window.FEATURE_NO_TITLE);
//         setContentView(R.layout.dialog_action_message);
//         ButterKnife.bind(this);
// 
//         WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
//         Window window = getWindow();
//         lp.copyFrom(window.getAttributes());
//         lp.width = WindowManager.LayoutParams.MATCH_PARENT;
//         lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
//         window.setAttributes(lp);
// 
//         toolbar.setNavigationIcon(R.drawable.ic_arrow_back_white_48px);
//         toolbar.setNavigationOnClickListener(new View.OnClickListener() {
//             @Override
//             public void onClick(View view) {
//                 dismiss();
//             }
//         });
// 
//         toolbar.setTitle(titleText);
//         msg.setText(msgText);
//         if (buttonText==null) {
//             ok.setVisibility(View.GONE);
//         } else {
//             ok.setText(buttonText);
//         }
//         if (negativeText!=null) {
//             cancel.setText(negativeText);
//         }
//     }
// 
//     public void setMsgText(String text) {
//         msgText= SpannedString.valueOf(text);
//     }
// 
//     public void setMsgText(Spanned text) {
//         msgText = text;
//     }
// 
//     public void setTitleText(String text) {
//         titleText=text;
//     }
// 
// 
//     public void setPositiveButtonMsg(String msg) {
//         buttonText=msg;
//     }
// 
// 
//     public void setNegativeButtonMsg(String msg) {
//         negativeText=msg;
//     }
// 
//     @OnClick(R.id.action_dialog_cancel)
//     public void close() {
//         dismiss();
//     }
// 
//     @OnClick(R.id.action_dialog_ok)
//     public void click() {
//         if (listener!=null) {
//             listener.onPositive();
//             dismiss();
//         }
//     }
// 
//     public void setOnPositiveListener(OnPositiveListener listener) {
//         this.listener = listener;
//     }
// 
//     public interface OnPositiveListener {
//         void onPositive();
//     }
// }


import android.animation.Animator;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.ContentUris;
import android.content.Context;
import android.database.Cursor;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.provider.DocumentsContract;
import android.provider.MediaStore;
import android.support.v7.view.menu.ActionMenuItemView;
import android.support.v7.widget.ActionMenuView;
import android.support.v7.widget.Toolbar;
import android.text.Html;
import android.util.Log;
import android.view.View;
import android.view.ViewAnimationUtils;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.widget.ImageButton;
import org.polaric.cluttr.dialogs.ActionMessageDialog;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
        public static void colorizeToolbar(Toolbar toolbarView, int toolbarIconsColor) {
            final PorterDuffColorFilter colorFilter = new PorterDuffColorFilter(toolbarIconsColor, PorterDuff.Mode.MULTIPLY);
            for(int i = 0; i < toolbarView.getChildCount(); i++) {
                final View v = toolbarView.getChildAt(i);
                if(v instanceof ImageButton) {
                    ((ImageButton)v).getDrawable().setColorFilter(colorFilter);
                }
                if(v instanceof ActionMenuView) {
                    for(int j = 0; j < ((ActionMenuView)v).getChildCount(); j++) {
                        final View innerView = ((ActionMenuView)v).getChildAt(j);
                        if(innerView instanceof ActionMenuItemView) {
                            int drawablesCount = ((ActionMenuItemView)innerView).getCompoundDrawables().length;
                            for(int k = 0; k < drawablesCount; k++) {
                                if(((ActionMenuItemView)innerView).getCompoundDrawables()[k] != null) {
                                    final int finalK = k;
                                    innerView.post(new Runnable() {
                                        @Override
                                        public void run() {
                                            ((ActionMenuItemView) innerView).getCompoundDrawables()[finalK].setColorFilter(colorFilter);
                                        }
                                    });
                                }
                            }
                        }
                    }
                }
            }
        }

        public static void showChangelogDialog(Context context) {
// Path: app/src/main/java/org/polaric/cluttr/dialogs/ActionMessageDialog.java
// public class ActionMessageDialog extends Dialog {
//     @BindView(R.id.action_dialog_toolbar) Toolbar toolbar;
//     @BindView(R.id.action_dialog_message) TextView msg;
//     @BindView(R.id.action_dialog_ok) Button ok;
//     @BindView(R.id.action_dialog_cancel) Button cancel;
// 
//     private String buttonText=null, negativeText, titleText;
//     private Spanned msgText;
// 
//     private OnPositiveListener listener;
// 
//     public ActionMessageDialog(Context context) {
//         super(context);
//     }
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         requestWindowFeature(Window.FEATURE_NO_TITLE);
//         setContentView(R.layout.dialog_action_message);
//         ButterKnife.bind(this);
// 
//         WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
//         Window window = getWindow();
//         lp.copyFrom(window.getAttributes());
//         lp.width = WindowManager.LayoutParams.MATCH_PARENT;
//         lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
//         window.setAttributes(lp);
// 
//         toolbar.setNavigationIcon(R.drawable.ic_arrow_back_white_48px);
//         toolbar.setNavigationOnClickListener(new View.OnClickListener() {
//             @Override
//             public void onClick(View view) {
//                 dismiss();
//             }
//         });
// 
//         toolbar.setTitle(titleText);
//         msg.setText(msgText);
//         if (buttonText==null) {
//             ok.setVisibility(View.GONE);
//         } else {
//             ok.setText(buttonText);
//         }
//         if (negativeText!=null) {
//             cancel.setText(negativeText);
//         }
//     }
// 
//     public void setMsgText(String text) {
//         msgText= SpannedString.valueOf(text);
//     }
// 
//     public void setMsgText(Spanned text) {
//         msgText = text;
//     }
// 
//     public void setTitleText(String text) {
//         titleText=text;
//     }
// 
// 
//     public void setPositiveButtonMsg(String msg) {
//         buttonText=msg;
//     }
// 
// 
//     public void setNegativeButtonMsg(String msg) {
//         negativeText=msg;
//     }
// 
//     @OnClick(R.id.action_dialog_cancel)
//     public void close() {
//         dismiss();
//     }
// 
//     @OnClick(R.id.action_dialog_ok)
//     public void click() {
//         if (listener!=null) {
//             listener.onPositive();
//             dismiss();
//         }
//     }
// 
//     public void setOnPositiveListener(OnPositiveListener listener) {
//         this.listener = listener;
//     }
// 
//     public interface OnPositiveListener {
//         void onPositive();
//     }
// }


// Path: app/src/main/java/org/polaric/cluttr/Util.java
import android.animation.Animator;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.ContentUris;
import android.content.Context;
import android.database.Cursor;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.provider.DocumentsContract;
import android.provider.MediaStore;
import android.support.v7.view.menu.ActionMenuItemView;
import android.support.v7.widget.ActionMenuView;
import android.support.v7.widget.Toolbar;
import android.text.Html;
import android.util.Log;
import android.view.View;
import android.view.ViewAnimationUtils;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.widget.ImageButton;
import org.polaric.cluttr.dialogs.ActionMessageDialog;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

        public static void colorizeToolbar(Toolbar toolbarView, int toolbarIconsColor) {
            final PorterDuffColorFilter colorFilter = new PorterDuffColorFilter(toolbarIconsColor, PorterDuff.Mode.MULTIPLY);
            for(int i = 0; i < toolbarView.getChildCount(); i++) {
                final View v = toolbarView.getChildAt(i);
                if(v instanceof ImageButton) {
                    ((ImageButton)v).getDrawable().setColorFilter(colorFilter);
                }
                if(v instanceof ActionMenuView) {
                    for(int j = 0; j < ((ActionMenuView)v).getChildCount(); j++) {
                        final View innerView = ((ActionMenuView)v).getChildAt(j);
                        if(innerView instanceof ActionMenuItemView) {
                            int drawablesCount = ((ActionMenuItemView)innerView).getCompoundDrawables().length;
                            for(int k = 0; k < drawablesCount; k++) {
                                if(((ActionMenuItemView)innerView).getCompoundDrawables()[k] != null) {
                                    final int finalK = k;
                                    innerView.post(new Runnable() {
                                        @Override
                                        public void run() {
                                            ((ActionMenuItemView) innerView).getCompoundDrawables()[finalK].setColorFilter(colorFilter);
                                        }
                                    });
                                }
                            }
                        }
                    }
                }
            }
        }

        public static void showChangelogDialog(Context context) {
            ActionMessageDialog d = new ActionMessageDialog(context);