Commit 937de386 authored by Donald Shtjefni's avatar Donald Shtjefni

Merge pull request #20 from Mow3l/master

Ui Tweeks (1° Activity)
parents 99a2c0d4 4c3ce8b9
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;
......@@ -62,13 +63,21 @@ public class AlbumsAdapter extends RecyclerView.Adapter<AlbumsAdapter.ViewHolder
String SColor = SP.getString("PrefColor", "#03A9F4");
holder.nPhotos.setText(Html.fromHtml("<b><font color='" + SColor + "'>" + a.getImagesCount() + "</font></b>" + "<font " +
"color='#FFFFFF'> Photos</font>"));
"color='#FFFFFF'> Photos</font>"));//FFFFFF
holder.name.setTag(a.Path);
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);
......
......@@ -140,7 +140,6 @@ public class AlbumsActivity extends AppCompatActivity implements FolderChooserDi
.withToolbar(toolbar)
.withAccountHeader(headerResult)
.withTranslucentStatusBar(false)
.addDrawerItems(
item1,
item2,
......@@ -505,6 +504,5 @@ public class AlbumsActivity extends AppCompatActivity implements FolderChooserDi
mRecyclerView.setLayoutManager(new GridLayoutManager(this, 2));
mRecyclerView.setItemAnimator(new DefaultItemAnimator());
adapt.notifyDataSetChanged();
}
}
......@@ -8,6 +8,9 @@
android:orientation="vertical"
tools:context=".MainActivity"
android:background="@color/background_material_dark">
<!--
android:background="@color/background_material_dark">
-->
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
......
......@@ -17,22 +17,36 @@
android:id="@+id/layout_card_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/unselected_album">
android:background="@color/toolbar">
<RelativeLayout
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
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"
/>
......@@ -57,7 +71,6 @@
android:textColor="@android:color/white"
android:textSize="16sp"
/>
<TextView
android:id="@+id/image_number_text"
android:layout_width="match_parent"
......@@ -68,7 +81,6 @@
android:textColor="@android:color/white"
android:textSize="14sp"
/>
</LinearLayout>
<!-- <ImageView android:id="@+id/image_menu"
android:layout_width="wrap_content"
......@@ -79,7 +91,6 @@
android:layout_alignParentRight="true"
android:layout_marginRight="5dp"
/>-->
</RelativeLayout>
</android.support.v7.widget.CardView>
</FrameLayout>
\ No newline at end of file
......@@ -8,7 +8,7 @@
<string-array name="ColorsPref">
<item>#03A9F4</item>
<item>#009688</item>
<item>#00796B</item>
<item>#FBC02D</item>
</string-array>
......
......@@ -2,7 +2,7 @@
<resources>
<!--BASE COLOR-->
<color name="status_bar">#00796b</color>
<color name="selected_album">#4db6ac</color>
<color name="selected_album">#009688</color>
<color name="unselected_album">#424242</color>
<color name="navigation_bar">#009688</color>
<color name="toolbar">#009688</color>
......
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