Commit 4c3ce8b9 authored by Gilbert Ndresaj's avatar Gilbert Ndresaj

Ui Tweeks (1° Activity)

Ui Tweeks (1° Activity)
parent 3b0027da
package com.leafpic.app.Adapters;
import android.content.SharedPreferences;
import android.graphics.PorterDuff;
import android.preference.PreferenceManager;
import android.support.v7.widget.RecyclerView;
import android.text.Html;
......@@ -67,8 +68,16 @@ public class AlbumsAdapter extends RecyclerView.Adapter<AlbumsAdapter.ViewHolder
if (a.isSelected()) {
holder.card_layout.setBackgroundColor(holder.card_layout.getContext().getColor(R.color.selected_album));
holder.picture.setColorFilter(0x77000000, PorterDuff.Mode.SRC_ATOP);
holder.selectHolder.setVisibility(View.VISIBLE);
} else {
holder.card_layout.setBackgroundColor(holder.card_layout.getContext().getColor(R.color.unselected_album));
//holder.picture.setColorFilter(0x00000000, PorterDuff.Mode.SRC_ATOP);
holder.picture.clearColorFilter();
holder.selectHolder.setVisibility(View.INVISIBLE);
}
}
......@@ -90,12 +99,14 @@ public class AlbumsAdapter extends RecyclerView.Adapter<AlbumsAdapter.ViewHolder
public static class ViewHolder extends RecyclerView.ViewHolder {
RelativeLayout card_layout;
ImageView picture;
ImageView selectHolder;
TextView name;
TextView nPhotos;
public ViewHolder(View itemView) {
super(itemView);
picture = (ImageView) itemView.findViewById(R.id.picture);
selectHolder = (ImageView) itemView.findViewById(R.id.selectedPicIcon);
card_layout = (RelativeLayout) itemView.findViewById(R.id.layout_card_id);
name = (TextView) itemView.findViewById(R.id.picturetext);
nPhotos = (TextView) itemView.findViewById(R.id.image_number_text);
......
......@@ -18,20 +18,35 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/toolbar">
<RelativeLayout
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/picture"
android:layout_width="match_parent"
android:layout_height="140dp"
android:scaleType="centerCrop"
/>
android:id="@+id/selectedPicIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible"
android:elevation="10dp"
android:src="@mipmap/ic_done_white_48dp"
android:layout_gravity="center"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
/>
<ImageView
android:id="@+id/picture"
android:layout_width="match_parent"
android:layout_height="140dp"
android:scaleType="centerCrop"
/>
</RelativeLayout>
<!--VIEW divider DIVIDE IMMAGINE DALL TESTO SOTTO-->
<View
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_below="@id/picture"
android:layout_below="@id/img"
android:background="@android:color/darker_gray"
/>
......
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