Add share icons and localFileIndicator to grid_image and grid_item layout

This commit is contained in:
masensio 2015-01-27 09:46:19 +01:00
parent d2d20d9ec1
commit 051265620c
2 changed files with 66 additions and 12 deletions

View file

@ -2,8 +2,7 @@
<!--
ownCloud Android client application
Copyright (C) 2012 Bartek Przybylski
Copyright (C) 2012-2013 ownCloud Inc.
Copyright (C) 2014 ownCloud Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2,
@ -15,7 +14,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
@ -31,6 +30,24 @@
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<ImageView
android:id="@+id/sharedIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|left"
android:layout_marginLeft="2dp"
android:layout_marginTop="2dp"
android:src="@drawable/sharedlink" />
<ImageView
android:id="@+id/sharedWithMeIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|left"
android:layout_marginLeft="2dp"
android:layout_marginTop="2dp"
android:src="@drawable/shared_with_me" />
<com.owncloud.android.ui.SquareImageView
android:id="@+id/thumbnail"
android:layout_width="match_parent"
@ -40,6 +57,15 @@
android:scaleType="centerCrop"
android:src="@drawable/ic_menu_archive" />
<ImageView
android:id="@+id/localFileIndicator"
android:layout_width="@dimen/file_icon_size"
android:layout_height="@dimen/file_icon_size"
android:layout_gravity="top|right"
android:layout_marginTop="2dp"
android:layout_marginRight="2dp"
android:src="@drawable/local_file_indicator" />
<ImageView
android:id="@+id/favoriteIcon"
android:layout_width="15dp"
@ -49,6 +75,8 @@
android:layout_marginRight="2dp"
android:src="@drawable/ic_favorite" />
</FrameLayout>
</LinearLayout>

View file

@ -2,8 +2,7 @@
<!--
ownCloud Android client application
Copyright (C) 2012 Bartek Przybylski
Copyright (C) 2012-2013 ownCloud Inc.
Copyright (C) 2014 ownCloud Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2,
@ -33,13 +32,22 @@
android:layout_gravity="center_horizontal" >
<ImageView
android:id="@+id/favoriteIcon"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_gravity="bottom|right"
android:layout_marginBottom="2dp"
android:layout_marginRight="2dp"
android:src="@drawable/ic_favorite" />
android:id="@+id/sharedIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|left"
android:layout_marginLeft="2dp"
android:layout_marginTop="2dp"
android:src="@drawable/sharedlink" />
<ImageView
android:id="@+id/sharedWithMeIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|left"
android:layout_marginLeft="2dp"
android:layout_marginTop="2dp"
android:src="@drawable/shared_with_me" />
<ImageView
android:id="@+id/thumbnail"
@ -50,6 +58,24 @@
android:layout_marginRight="10dp"
android:src="@drawable/ic_menu_archive" />
<ImageView
android:id="@+id/localFileIndicator"
android:layout_width="@dimen/file_icon_size"
android:layout_height="@dimen/file_icon_size"
android:layout_gravity="top|right"
android:layout_marginTop="2dp"
android:layout_marginRight="2dp"
android:src="@drawable/local_file_indicator" />
<ImageView
android:id="@+id/favoriteIcon"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_gravity="bottom|right"
android:layout_marginBottom="2dp"
android:layout_marginRight="2dp"
android:src="@drawable/ic_favorite" />
</FrameLayout>
<TextView