Made progress with the folder feature.

This commit is contained in:
Karim Abou Zeid 2016-03-16 00:41:17 +01:00
commit 1e6ac6a227
38 changed files with 1423 additions and 148 deletions

View file

@ -13,6 +13,7 @@ import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Build;
import android.support.annotation.AttrRes;
import android.support.annotation.ColorInt;
import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
@ -94,7 +95,7 @@ public class Util {
return dimensionPixelSize;
}
public static Drawable getTintedDrawable(@NonNull Context context, @DrawableRes int drawableResId, int color) {
public static Drawable getTintedDrawable(@NonNull Context context, @DrawableRes int drawableResId, @ColorInt int color) {
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP) {
// vector support
context = TintContextWrapper.wrap(context);

View file

@ -17,6 +17,12 @@ import android.view.View;
import android.view.animation.PathInterpolator;
import android.widget.TextView;
import com.kabouzeid.appthemehelper.util.ATHUtil;
import com.kabouzeid.appthemehelper.util.ColorUtil;
import com.kabouzeid.appthemehelper.util.MaterialValueHelper;
import com.kabouzeid.gramophone.R;
import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView;
/**
* @author Karim Abou Zeid (kabouzeid)
*/
@ -71,4 +77,11 @@ public class ViewUtil {
return (x >= left) && (x <= right) && (y >= top) && (y <= bottom);
}
public static void setUpFastScrollRecyclerViewColor(Context context, FastScrollRecyclerView recyclerView, int accentColor) {
recyclerView.setPopupBgColor(accentColor);
recyclerView.setPopupTextColor(MaterialValueHelper.getPrimaryTextColor(context, ColorUtil.isColorLight(accentColor)));
recyclerView.setThumbColor(accentColor);
recyclerView.setTrackColor(ColorUtil.withAlpha(ATHUtil.resolveColor(context, R.attr.colorControlNormal), 0.12f));
}
}