tobiasKaminsky 10 anni fa
parent
commit
b810a773af

+ 0 - 49
res/layout/image_fragment.xml

@@ -1,49 +0,0 @@
-<?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>

+ 0 - 119
res/layout/image_item.xml

@@ -1,119 +0,0 @@
-<?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/>.
-  
--->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/ListItemLayout"
-    android:layout_width="fill_parent"
-    android:layout_height="160dp"
-    android:background="@drawable/list_selector"
-    android:orientation="horizontal" >
-
-    <ImageView
-        android:id="@+id/imageView1"
-        android:layout_width="150dp"
-        android:layout_height="150dp"
-        android:layout_marginBottom="5dp"
-        android:layout_marginLeft="9dp"
-        android:layout_marginTop="5dp"
-        android:src="@drawable/ic_menu_archive" />
-
-    <FrameLayout
-        android:id="@+id/imageItemFrame"
-        android:layout_width="56dp"
-        android:layout_height="56dp"
-        android:focusable="false"
-        android:focusableInTouchMode="false" >
-
-        <ImageView
-            android:id="@+id/sharedIcon"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginBottom="4dp"
-            android:layout_marginLeft="4dp"
-            android:layout_marginRight="4dp"
-            android:src="@drawable/sharedlink" />
-
-        <ImageView
-            android:id="@+id/sharedWithMeIcon"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="4dp"
-            android:layout_marginRight="4dp"
-            android:layout_marginTop="4dp"
-            android:src="@drawable/shared_with_me" />
-
-        <ImageView
-            android:id="@+id/custom_checkbox"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="4dp"
-            android:layout_marginRight="4dp"
-            android:src="@android:drawable/checkbox_off_background" />
-
-        <ImageView
-            android:id="@+id/imageView2"
-            android:layout_width="32dp"
-            android:layout_height="32dp"
-            android:layout_gravity="center_vertical"
-            android:layout_marginLeft="22dp"
-            android:src="@drawable/local_file_indicator" />
-
-        <TextView
-            android:id="@+id/Filename"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="4dp"
-            android:layout_marginRight="4dp"
-            android:ellipsize="middle"
-            android:singleLine="true"
-            android:text="TextView"
-            android:textColor="#303030"
-            android:textSize="16dip" />
-
-        <ImageView
-            android:id="@+id/imageView3"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="bottom|right"
-            android:layout_marginBottom="10dp"
-            android:layout_marginRight="2dp"
-            android:src="@drawable/ic_favorite" />
-
-        <TextView
-            android:id="@+id/last_mod"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_weight=".5"
-            android:text="TextView"
-            android:textColor="@color/list_item_lastmod_and_filesize_text"
-            android:textSize="12dip" />
-
-        <TextView
-            android:id="@+id/file_size"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_weight=".5"
-            android:gravity="right"
-            android:text="TextView"
-            android:textColor="@color/list_item_lastmod_and_filesize_text"
-            android:textSize="12dip" />
-    </FrameLayout>
-
-</LinearLayout>

+ 1 - 21
src/com/owncloud/android/ui/adapter/FileListListAdapter.java

@@ -28,15 +28,10 @@ import android.accounts.OperationCanceledException;
 import android.content.Context;
 import android.content.res.Resources;
 import android.graphics.Bitmap;
-<<<<<<< HEAD
 import android.graphics.Bitmap.CompressFormat;
 import android.graphics.BitmapFactory;
 import android.media.ThumbnailUtils;
 import android.os.AsyncTask;
-=======
-import android.graphics.BitmapFactory;
-import android.media.ThumbnailUtils;
->>>>>>> c0dc4c42d71eb9593ff48a02a8af74bd7df8776e
 import android.util.TypedValue;
 import android.view.LayoutInflater;
 import android.view.View;
@@ -325,7 +320,6 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter {
                     }
                     checkBoxV.setVisibility(View.VISIBLE);
                 }
-<<<<<<< HEAD
                 
                 // first set thumbnail according to Mimetype, prevents empty thumbnails
                 fileIcon.setImageResource(DisplayUtils.getResourceId(file.getMimetype(), file.getFileName()));
@@ -341,21 +335,7 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter {
                         new BitmapWorkerTask(fileIcon).execute(file);
                     }
                 }
-                
-=======
-
-                // generate Thumbnail if file is available local and image
-                if (file.isDown() && file.isImage()){
-                    // Converts dp to pixel
-                    Resources r = mContext.getResources();
-                    int px = (int) Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 150, r.getDisplayMetrics()));
-                    Bitmap bitmap = BitmapFactory.decodeFile(file.getStoragePath());
-                    fileIcon.setImageBitmap(ThumbnailUtils.extractThumbnail(bitmap, px, px));
-                } else {
-                    fileIcon.setImageResource(DisplayUtils.getResourceId(file.getMimetype(), file.getFileName()));  
-                }
-
->>>>>>> c0dc4c42d71eb9593ff48a02a8af74bd7df8776e
+
                 if (checkIfFileIsSharedWithMe(file)) {
                     sharedWithMeIconV.setVisibility(View.VISIBLE);
                 }