+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ownCloud Android client application
-
- Copyright (C) 2012 Bartek Przybylski
- Copyright (C) 2012-2013 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,
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 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/>.
- -->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1" >
-
- <android.support.v4.widget.SwipeRefreshLayout
- android:id="@+id/swipe_refresh_files"
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
-
- <com.owncloud.android.ui.ExtendedListView
- android:id="@+id/list_root"
- android:layout_width="match_parent"
- android:layout_height="match_parent" />
-
- </android.support.v4.widget.SwipeRefreshLayout>
-
- <android.support.v4.widget.SwipeRefreshLayout
- android:id="@+id/swipe_refresh_files_emptyView"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:visibility="gone" >
-
- <GridView
- android:id="@+id/grid_list_view"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:numColumns="3" />
- </android.support.v4.widget.SwipeRefreshLayout>
-</FrameLayout>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
- ownCloud Android client application\r
-\r
- Copyright (C) 2012 Bartek Przybylski\r
- Copyright (C) 2012-2013 ownCloud Inc.\r
-\r
- This program is free software: you can redistribute it and/or modify\r
- it under the terms of the GNU General Public License version 2,\r
- as published by the Free Software Foundation.\r
-\r
- This program is distributed in the hope that it will be useful,\r
- but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- GNU General Public License for more details.\r
-\r
- You should have received a copy of the GNU General Public License\r
- along with this program. If not, see <http://www.gnu.org/licenses/>.\r
- \r
--->\r
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"\r
- android:id="@+id/ListItemLayout"\r
- android:layout_width="fill_parent"\r
- android:layout_height="160dp"\r
- android:background="@drawable/list_selector"\r
- android:orientation="horizontal" >\r
-\r
- <ImageView\r
- android:id="@+id/imageView1"\r
- android:layout_width="150dp"\r
- android:layout_height="150dp"\r
- android:layout_marginBottom="5dp"\r
- android:layout_marginLeft="9dp"\r
- android:layout_marginTop="5dp"\r
- android:src="@drawable/ic_menu_archive" />\r
-\r
- <FrameLayout\r
- android:id="@+id/imageItemFrame"\r
- android:layout_width="56dp"\r
- android:layout_height="56dp"\r
- android:focusable="false"\r
- android:focusableInTouchMode="false" >\r
-\r
- <ImageView\r
- android:id="@+id/sharedIcon"\r
- android:layout_width="wrap_content"\r
- android:layout_height="wrap_content"\r
- android:layout_marginBottom="4dp"\r
- android:layout_marginLeft="4dp"\r
- android:layout_marginRight="4dp"\r
- android:src="@drawable/sharedlink" />\r
-\r
- <ImageView\r
- android:id="@+id/sharedWithMeIcon"\r
- android:layout_width="wrap_content"\r
- android:layout_height="wrap_content"\r
- android:layout_marginLeft="4dp"\r
- android:layout_marginRight="4dp"\r
- android:layout_marginTop="4dp"\r
- android:src="@drawable/shared_with_me" />\r
-\r
- <ImageView\r
- android:id="@+id/custom_checkbox"\r
- android:layout_width="wrap_content"\r
- android:layout_height="wrap_content"\r
- android:layout_marginLeft="4dp"\r
- android:layout_marginRight="4dp"\r
- android:src="@android:drawable/checkbox_off_background" />\r
-\r
- <ImageView\r
- android:id="@+id/imageView2"\r
- android:layout_width="32dp"\r
- android:layout_height="32dp"\r
- android:layout_gravity="center_vertical"\r
- android:layout_marginLeft="22dp"\r
- android:src="@drawable/local_file_indicator" />\r
-\r
- <TextView\r
- android:id="@+id/Filename"\r
- android:layout_width="wrap_content"\r
- android:layout_height="wrap_content"\r
- android:layout_marginLeft="4dp"\r
- android:layout_marginRight="4dp"\r
- android:ellipsize="middle"\r
- android:singleLine="true"\r
- android:text="TextView"\r
- android:textColor="#303030"\r
- android:textSize="16dip" />\r
-\r
- <ImageView\r
- android:id="@+id/imageView3"\r
- android:layout_width="wrap_content"\r
- android:layout_height="wrap_content"\r
- android:layout_gravity="bottom|right"\r
- android:layout_marginBottom="10dp"\r
- android:layout_marginRight="2dp"\r
- android:src="@drawable/ic_favorite" />\r
-\r
- <TextView\r
- android:id="@+id/last_mod"\r
- android:layout_width="wrap_content"\r
- android:layout_height="wrap_content"\r
- android:layout_weight=".5"\r
- android:text="TextView"\r
- android:textColor="@color/list_item_lastmod_and_filesize_text"\r
- android:textSize="12dip" />\r
-\r
- <TextView\r
- android:id="@+id/file_size"\r
- android:layout_width="wrap_content"\r
- android:layout_height="wrap_content"\r
- android:layout_weight=".5"\r
- android:gravity="right"\r
- android:text="TextView"\r
- android:textColor="@color/list_item_lastmod_and_filesize_text"\r
- android:textSize="12dip" />\r
- </FrameLayout>\r
-\r
-</LinearLayout>
\ No newline at end of file
import android.content.Context;\r
import android.content.res.Resources;\r
import android.graphics.Bitmap;\r
-<<<<<<< HEAD
import android.graphics.Bitmap.CompressFormat;\r
import android.graphics.BitmapFactory;\r
import android.media.ThumbnailUtils;\r
import android.os.AsyncTask;\r
-=======
-import android.graphics.BitmapFactory;\r
-import android.media.ThumbnailUtils;\r
->>>>>>> c0dc4c42d71eb9593ff48a02a8af74bd7df8776e
import android.util.TypedValue;\r
import android.view.LayoutInflater;\r
import android.view.View;\r
}\r
checkBoxV.setVisibility(View.VISIBLE);\r
}\r
-<<<<<<< HEAD
\r
// first set thumbnail according to Mimetype, prevents empty thumbnails\r
fileIcon.setImageResource(DisplayUtils.getResourceId(file.getMimetype(), file.getFileName()));\r
new BitmapWorkerTask(fileIcon).execute(file);\r
}\r
}\r
- \r
-=======
-\r
- // generate Thumbnail if file is available local and image\r
- if (file.isDown() && file.isImage()){\r
- // Converts dp to pixel\r
- Resources r = mContext.getResources();\r
- int px = (int) Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 150, r.getDisplayMetrics()));\r
- Bitmap bitmap = BitmapFactory.decodeFile(file.getStoragePath());\r
- fileIcon.setImageBitmap(ThumbnailUtils.extractThumbnail(bitmap, px, px));\r
- } else {\r
- fileIcon.setImageResource(DisplayUtils.getResourceId(file.getMimetype(), file.getFileName())); \r
- }\r
-\r
->>>>>>> c0dc4c42d71eb9593ff48a02a8af74bd7df8776e
+
if (checkIfFileIsSharedWithMe(file)) {\r
sharedWithMeIconV.setVisibility(View.VISIBLE);\r
}\r