Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
LeafPic
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
59
Issues
59
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HoraApps
LeafPic
Commits
937de386
Commit
937de386
authored
Feb 07, 2016
by
Donald Shtjefni
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #20 from Mow3l/master
Ui Tweeks (1° Activity)
parents
99a2c0d4
4c3ce8b9
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
40 additions
and
17 deletions
+40
-17
app/src/main/java/com/leafpic/app/Adapters/AlbumsAdapter.java
...src/main/java/com/leafpic/app/Adapters/AlbumsAdapter.java
+12
-1
app/src/main/java/com/leafpic/app/AlbumsActivity.java
app/src/main/java/com/leafpic/app/AlbumsActivity.java
+0
-2
app/src/main/res/layout/activity_albums.xml
app/src/main/res/layout/activity_albums.xml
+3
-0
app/src/main/res/layout/album_card.xml
app/src/main/res/layout/album_card.xml
+23
-12
app/src/main/res/mipmap-hdpi/ic_done_white_48dp.png
app/src/main/res/mipmap-hdpi/ic_done_white_48dp.png
+0
-0
app/src/main/res/mipmap-mdpi/ic_done_white_48dp.png
app/src/main/res/mipmap-mdpi/ic_done_white_48dp.png
+0
-0
app/src/main/res/mipmap-xhdpi/ic_done_white_48dp.png
app/src/main/res/mipmap-xhdpi/ic_done_white_48dp.png
+0
-0
app/src/main/res/mipmap-xxhdpi/ic_done_white_48dp.png
app/src/main/res/mipmap-xxhdpi/ic_done_white_48dp.png
+0
-0
app/src/main/res/values/array.xml
app/src/main/res/values/array.xml
+1
-1
app/src/main/res/values/colors.xml
app/src/main/res/values/colors.xml
+1
-1
No files found.
app/src/main/java/com/leafpic/app/Adapters/AlbumsAdapter.java
View file @
937de386
package
com
.
leafpic
.
app
.
Adapters
;
package
com
.
leafpic
.
app
.
Adapters
;
import
android.content.SharedPreferences
;
import
android.content.SharedPreferences
;
import
android.graphics.PorterDuff
;
import
android.preference.PreferenceManager
;
import
android.preference.PreferenceManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.RecyclerView
;
import
android.text.Html
;
import
android.text.Html
;
...
@@ -62,13 +63,21 @@ public class AlbumsAdapter extends RecyclerView.Adapter<AlbumsAdapter.ViewHolder
...
@@ -62,13 +63,21 @@ public class AlbumsAdapter extends RecyclerView.Adapter<AlbumsAdapter.ViewHolder
String
SColor
=
SP
.
getString
(
"PrefColor"
,
"#03A9F4"
);
String
SColor
=
SP
.
getString
(
"PrefColor"
,
"#03A9F4"
);
holder
.
nPhotos
.
setText
(
Html
.
fromHtml
(
"<b><font color='"
+
SColor
+
"'>"
+
a
.
getImagesCount
()
+
"</font></b>"
+
"<font "
+
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
);
holder
.
name
.
setTag
(
a
.
Path
);
if
(
a
.
isSelected
())
{
if
(
a
.
isSelected
())
{
holder
.
card_layout
.
setBackgroundColor
(
holder
.
card_layout
.
getContext
().
getColor
(
R
.
color
.
selected_album
));
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
{
}
else
{
holder
.
card_layout
.
setBackgroundColor
(
holder
.
card_layout
.
getContext
().
getColor
(
R
.
color
.
unselected_album
));
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
...
@@ -90,12 +99,14 @@ public class AlbumsAdapter extends RecyclerView.Adapter<AlbumsAdapter.ViewHolder
public
static
class
ViewHolder
extends
RecyclerView
.
ViewHolder
{
public
static
class
ViewHolder
extends
RecyclerView
.
ViewHolder
{
RelativeLayout
card_layout
;
RelativeLayout
card_layout
;
ImageView
picture
;
ImageView
picture
;
ImageView
selectHolder
;
TextView
name
;
TextView
name
;
TextView
nPhotos
;
TextView
nPhotos
;
public
ViewHolder
(
View
itemView
)
{
public
ViewHolder
(
View
itemView
)
{
super
(
itemView
);
super
(
itemView
);
picture
=
(
ImageView
)
itemView
.
findViewById
(
R
.
id
.
picture
);
picture
=
(
ImageView
)
itemView
.
findViewById
(
R
.
id
.
picture
);
selectHolder
=
(
ImageView
)
itemView
.
findViewById
(
R
.
id
.
selectedPicIcon
);
card_layout
=
(
RelativeLayout
)
itemView
.
findViewById
(
R
.
id
.
layout_card_id
);
card_layout
=
(
RelativeLayout
)
itemView
.
findViewById
(
R
.
id
.
layout_card_id
);
name
=
(
TextView
)
itemView
.
findViewById
(
R
.
id
.
picturetext
);
name
=
(
TextView
)
itemView
.
findViewById
(
R
.
id
.
picturetext
);
nPhotos
=
(
TextView
)
itemView
.
findViewById
(
R
.
id
.
image_number_text
);
nPhotos
=
(
TextView
)
itemView
.
findViewById
(
R
.
id
.
image_number_text
);
...
...
app/src/main/java/com/leafpic/app/AlbumsActivity.java
View file @
937de386
...
@@ -140,7 +140,6 @@ public class AlbumsActivity extends AppCompatActivity implements FolderChooserDi
...
@@ -140,7 +140,6 @@ public class AlbumsActivity extends AppCompatActivity implements FolderChooserDi
.
withToolbar
(
toolbar
)
.
withToolbar
(
toolbar
)
.
withAccountHeader
(
headerResult
)
.
withAccountHeader
(
headerResult
)
.
withTranslucentStatusBar
(
false
)
.
withTranslucentStatusBar
(
false
)
.
addDrawerItems
(
.
addDrawerItems
(
item1
,
item1
,
item2
,
item2
,
...
@@ -505,6 +504,5 @@ public class AlbumsActivity extends AppCompatActivity implements FolderChooserDi
...
@@ -505,6 +504,5 @@ public class AlbumsActivity extends AppCompatActivity implements FolderChooserDi
mRecyclerView
.
setLayoutManager
(
new
GridLayoutManager
(
this
,
2
));
mRecyclerView
.
setLayoutManager
(
new
GridLayoutManager
(
this
,
2
));
mRecyclerView
.
setItemAnimator
(
new
DefaultItemAnimator
());
mRecyclerView
.
setItemAnimator
(
new
DefaultItemAnimator
());
adapt
.
notifyDataSetChanged
();
adapt
.
notifyDataSetChanged
();
}
}
}
}
app/src/main/res/layout/activity_albums.xml
View file @
937de386
...
@@ -8,6 +8,9 @@
...
@@ -8,6 +8,9 @@
android:orientation=
"vertical"
android:orientation=
"vertical"
tools:context=
".MainActivity"
tools:context=
".MainActivity"
android:background=
"@color/background_material_dark"
>
android:background=
"@color/background_material_dark"
>
<!--
android:background="@color/background_material_dark">
-->
<LinearLayout
<LinearLayout
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
app/src/main/res/layout/album_card.xml
View file @
937de386
...
@@ -17,22 +17,36 @@
...
@@ -17,22 +17,36 @@
android:id=
"@+id/layout_card_id"
android:id=
"@+id/layout_card_id"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"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
<ImageView
android:id=
"@+id/picture"
android:id=
"@+id/selectedPicIcon"
android:layout_width=
"match_parent"
android:layout_width=
"wrap_content"
android:layout_height=
"140dp"
android:layout_height=
"wrap_content"
android:scaleType=
"centerCrop"
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 divider DIVIDE IMMAGINE DALL TESTO SOTTO-->
<View
<View
android:id=
"@+id/divider"
android:id=
"@+id/divider"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_height=
"0dp"
android:layout_below=
"@id/
picture
"
android:layout_below=
"@id/
img
"
android:background=
"@android:color/darker_gray"
android:background=
"@android:color/darker_gray"
/>
/>
...
@@ -57,7 +71,6 @@
...
@@ -57,7 +71,6 @@
android:textColor=
"@android:color/white"
android:textColor=
"@android:color/white"
android:textSize=
"16sp"
android:textSize=
"16sp"
/>
/>
<TextView
<TextView
android:id=
"@+id/image_number_text"
android:id=
"@+id/image_number_text"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -68,7 +81,6 @@
...
@@ -68,7 +81,6 @@
android:textColor=
"@android:color/white"
android:textColor=
"@android:color/white"
android:textSize=
"14sp"
android:textSize=
"14sp"
/>
/>
</LinearLayout>
</LinearLayout>
<!-- <ImageView android:id="@+id/image_menu"
<!-- <ImageView android:id="@+id/image_menu"
android:layout_width="wrap_content"
android:layout_width="wrap_content"
...
@@ -79,7 +91,6 @@
...
@@ -79,7 +91,6 @@
android:layout_alignParentRight="true"
android:layout_alignParentRight="true"
android:layout_marginRight="5dp"
android:layout_marginRight="5dp"
/>-->
/>-->
</RelativeLayout>
</RelativeLayout>
</android.support.v7.widget.CardView>
</android.support.v7.widget.CardView>
</FrameLayout>
</FrameLayout>
\ No newline at end of file
app/src/main/res/mipmap-hdpi/ic_done_white_48dp.png
0 → 100644
View file @
937de386
255 Bytes
app/src/main/res/mipmap-mdpi/ic_done_white_48dp.png
0 → 100644
View file @
937de386
199 Bytes
app/src/main/res/mipmap-xhdpi/ic_done_white_48dp.png
0 → 100644
View file @
937de386
308 Bytes
app/src/main/res/mipmap-xxhdpi/ic_done_white_48dp.png
0 → 100644
View file @
937de386
386 Bytes
app/src/main/res/values/array.xml
View file @
937de386
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<string-array
name=
"ColorsPref"
>
<string-array
name=
"ColorsPref"
>
<item>
#03A9F4
</item>
<item>
#03A9F4
</item>
<item>
#00
9688
</item>
<item>
#00
796B
</item>
<item>
#FBC02D
</item>
<item>
#FBC02D
</item>
</string-array>
</string-array>
...
...
app/src/main/res/values/colors.xml
View file @
937de386
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<resources>
<resources>
<!--BASE COLOR-->
<!--BASE COLOR-->
<color
name=
"status_bar"
>
#00796b
</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=
"unselected_album"
>
#424242
</color>
<color
name=
"navigation_bar"
>
#009688
</color>
<color
name=
"navigation_bar"
>
#009688
</color>
<color
name=
"toolbar"
>
#009688
</color>
<color
name=
"toolbar"
>
#009688
</color>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment