Commit 905b64e0 authored by Gilbert Ndresaj's avatar Gilbert Ndresaj

Fixed Icon Color Issue

#hacktoberfest
parent 0685f07d
......@@ -15,6 +15,7 @@ import com.bumptech.glide.Glide;
import com.bumptech.glide.load.DecodeFormat;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions;
import com.mikepenz.iconics.view.IconicsImageView;
import com.orhanobut.hawk.Hawk;
import org.horaapps.leafpic.CardViewStyle;
......@@ -324,7 +325,7 @@ public class AlbumsAdapter extends ThemedAdapter<AlbumsAdapter.ViewHolder> {
@BindView(R.id.album_card) CardView card;
@BindView(R.id.album_preview) ImageView picture;
@BindView(R.id.selected_icon) View selectedIcon;
@BindView(R.id.selected_icon) IconicsImageView selectedIcon;
@BindView(R.id.ll_album_info) View footer;
@BindView(R.id.ll_media_count) View llCount;
@BindView(R.id.album_name) TextView name;
......@@ -343,6 +344,7 @@ public class AlbumsAdapter extends ThemedAdapter<AlbumsAdapter.ViewHolder> {
footer.setBackgroundColor(theme.getPrimaryColor());
picture.setColorFilter(0x77000000, PorterDuff.Mode.SRC_ATOP);
selectedIcon.setVisibility(View.VISIBLE);
selectedIcon.setColor(theme.getPrimaryColor());
} else {
picture.clearColorFilter();
selectedIcon.setVisibility(View.GONE);
......
......@@ -215,7 +215,7 @@ public class MediaAdapter extends ThemedAdapter<MediaAdapter.ViewHolder> {
//ANIMS
holder.icon.animate().alpha(1).setDuration(250);
holder.path.animate().alpha(1).setDuration(250);
holder.icon.setColor(getThemeHelper().getPrimaryColor());
} else {
holder.icon.setVisibility(View.GONE);
holder.path.setVisibility(View.GONE);
......@@ -229,6 +229,7 @@ public class MediaAdapter extends ThemedAdapter<MediaAdapter.ViewHolder> {
holder.icon.setVisibility(View.VISIBLE);
holder.imageView.setColorFilter(0x88000000, PorterDuff.Mode.SRC_ATOP);
holder.layout.setPadding(15,15,15,15);
holder.icon.setColor(getThemeHelper().getPrimaryColor());
//ANIMS
holder.icon.animate().alpha(1).setDuration(250);
//holder.layout.setBackgroundColor(ThemeHelper.getPrimaryColor(holder.path.getContext()));
......
......@@ -2,7 +2,6 @@ package org.horaapps.leafpic.fragments;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
......@@ -16,12 +15,14 @@ import com.mikepenz.iconics.view.IconicsImageView;
import org.horaapps.leafpic.activities.SingleMediaActivity;
import org.horaapps.leafpic.data.Media;
import org.horaapps.leafpic.data.StorageHelper;
import org.horaapps.liz.ThemeHelper;
import org.horaapps.liz.ThemedFragment;
/**
* Created by dnld on 18/02/16.
*/
public class VideoFragment extends Fragment {
public class VideoFragment extends ThemedFragment {
private Media video;
......@@ -61,6 +62,9 @@ public class VideoFragment extends Fragment {
}
});
//TODO: this need to be fixed better, wont get the color
//videoInd.setColor(getThemeHelper().getPrimaryColor());
RequestOptions options = new RequestOptions()
.signature(video.getSignature())
.centerCrop()
......@@ -75,4 +79,9 @@ public class VideoFragment extends Fragment {
picture.setOnClickListener(v -> ((SingleMediaActivity) getActivity()).toggleSystemUI());
return view;
}
@Override
public void refreshTheme(ThemeHelper themeHelper) {
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/media_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/ripple"
android:clickable="true"
/>
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.mikepenz.iconics.view.IconicsImageView
android:id="@+id/icon"
android:layout_width="50dp"
......@@ -22,4 +13,11 @@
app:iiv_color="@color/md_white_1000"
app:iiv_icon="gmd-play-circle-filled"
android:alpha="0.7"/>
<ImageView
android:id="@+id/media_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/ripple"
android:clickable="true"
/>
</FrameLayout>
\ No newline at end of file
......@@ -8,7 +8,7 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-beta6'
classpath 'com.android.tools.build:gradle:3.0.0-rc1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
......@@ -18,7 +18,7 @@ buildscript {
project.ext {
supportVersion = "26.1.0"
sdkVersion = 26
buildToolsVersion = '26.0.1'
buildToolsVersion = '26.0.2'
}
allprojects {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment