\r
<ImageView\r
android:id="@+id/imageView2"\r
- android:layout_width="32dp"\r
- android:layout_height="32dp"\r
+ android:layout_width="@dimen/file_icon_size"\r
+ android:layout_height="@dimen/file_icon_size"\r
android:layout_gravity="center_vertical"\r
android:layout_marginLeft="22dp"\r
android:src="@drawable/local_file_indicator" />\r
\r
<ImageView\r
android:id="@+id/imageView1"\r
- android:layout_width="32dp"\r
- android:layout_height="32dp"\r
+ android:layout_width="@dimen/file_icon_size"\r
+ android:layout_height="@dimen/file_icon_size"\r
android:layout_gravity="center_vertical"\r
android:layout_marginLeft="9dp"\r
android:src="@drawable/ic_menu_archive" />\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ownCloud Android client application
+
+ 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,
+ 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/>.
+-->
+<resources>
+ <dimen name="file_icon_size">32dp</dimen>
+</resources>
import android.widget.ImageView;
import com.owncloud.android.MainApp;
+import com.owncloud.android.R;
import com.owncloud.android.lib.common.OwnCloudAccount;
import com.owncloud.android.lib.common.OwnCloudClient;
import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
if (thumbnail == null || mFile.needsUpdateThumbnail()) {
// Converts dp to pixel
Resources r = MainApp.getAppContext().getResources();
- int px = (int) Math.round(TypedValue.applyDimension(
- TypedValue.COMPLEX_UNIT_DIP, 150, r.getDisplayMetrics()
- ));
+
+ int px = (int) Math.round(r.getDimension(R.dimen.file_icon_size));
if (mFile.isDown()){
Bitmap bitmap = BitmapUtils.decodeSampledBitmapFromFile(