diff options
author | aleksandar-stefanovic <theonewithideas@gmail.com> | 2016-12-29 20:55:55 +0100 |
---|---|---|
committer | jan iversen <jani@documentfoundation.org> | 2017-01-11 07:00:51 +0000 |
commit | a940c8280d26be030dd7a53cf7b4077430597e8d (patch) | |
tree | f70844012cf8c8d3b0452e604f599b19d874d0fb /android | |
parent | d976f9151af53319819c6adb77bc819c460c1bb5 (diff) |
Folder icon redesign
Replaced old and busted icon design, with Google's generic app icon.
It is now a vector drawable, which means it will be sharp at any resolution,
while we only need to keep one tiny xml file for it. No folder thumbnail
support, but this a welcomed change nontheless.
Change-Id: Ie6e38a6ac8e6cf1bc2d22247c11b5de0bd0d8478
Reviewed-on: https://gerrit.libreoffice.org/32498
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
Diffstat (limited to 'android')
-rw-r--r-- | android/source/res/drawable/folder.png | bin | 17274 -> 0 bytes | |||
-rw-r--r-- | android/source/res/drawable/ic_folder_black_24dp.xml | 5 | ||||
-rw-r--r-- | android/source/res/layout/file_explorer_grid_item.xml | 3 | ||||
-rw-r--r-- | android/source/res/layout/file_list_item.xml | 3 | ||||
-rw-r--r-- | android/source/src/java/org/libreoffice/ui/GridItemAdapter.java | 8 | ||||
-rw-r--r-- | android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java | 7 |
6 files changed, 22 insertions, 4 deletions
diff --git a/android/source/res/drawable/folder.png b/android/source/res/drawable/folder.png Binary files differdeleted file mode 100644 index 40a65984708d..000000000000 --- a/android/source/res/drawable/folder.png +++ /dev/null diff --git a/android/source/res/drawable/ic_folder_black_24dp.xml b/android/source/res/drawable/ic_folder_black_24dp.xml new file mode 100644 index 000000000000..1a9a16fb1704 --- /dev/null +++ b/android/source/res/drawable/ic_folder_black_24dp.xml @@ -0,0 +1,5 @@ +<vector android:autoMirrored="true" android:height="24dp" + android:viewportHeight="24.0" android:viewportWidth="24.0" + android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="#FF000000" android:pathData="M10,4H4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V8c0,-1.1 -0.9,-2 -2,-2h-8l-2,-2z"/> +</vector> diff --git a/android/source/res/layout/file_explorer_grid_item.xml b/android/source/res/layout/file_explorer_grid_item.xml index 8dfb9ed0a613..69e3c0ca928d 100644 --- a/android/source/res/layout/file_explorer_grid_item.xml +++ b/android/source/res/layout/file_explorer_grid_item.xml @@ -14,7 +14,8 @@ <ImageView android:id="@+id/grid_item_image" - tools:src="@drawable/folder" + tools:src="@drawable/ic_folder_black_24dp" + tools:tint="@color/text_color_secondary" android:layout_width="100dp" android:layout_height="100dp" android:scaleType="fitStart" diff --git a/android/source/res/layout/file_list_item.xml b/android/source/res/layout/file_list_item.xml index 352948817525..7d703befb233 100644 --- a/android/source/res/layout/file_list_item.xml +++ b/android/source/res/layout/file_list_item.xml @@ -12,7 +12,8 @@ android:orientation="horizontal" > <ImageView android:id="@+id/file_list_item_icon" - tools:src="@drawable/folder" + tools:src="@drawable/ic_folder_black_24dp" + tools:tint="@color/text_color_secondary" android:layout_height="match_parent" android:layout_width="32dp" android:layout_margin="8dp" diff --git a/android/source/src/java/org/libreoffice/ui/GridItemAdapter.java b/android/source/src/java/org/libreoffice/ui/GridItemAdapter.java index b083de40314b..6385769ca719 100644 --- a/android/source/src/java/org/libreoffice/ui/GridItemAdapter.java +++ b/android/source/src/java/org/libreoffice/ui/GridItemAdapter.java @@ -10,6 +10,7 @@ package org.libreoffice.ui; import android.content.Context; +import android.support.v4.content.ContextCompat; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -54,6 +55,8 @@ public class GridItemAdapter extends BaseAdapter { LayoutInflater inflater = (LayoutInflater) mContext.getSystemService( Context.LAYOUT_INFLATER_SERVICE); + Context context = inflater.getContext(); + View gridView; if (convertView == null) { @@ -74,7 +77,10 @@ public class GridItemAdapter extends BaseAdapter { .findViewById(R.id.grid_item_image); if (filePaths.get(position).isDirectory()) { // Is a folder // Default view is a generic folder icon. - imageView.setImageResource(R.drawable.folder); + imageView.setImageResource(R.drawable.ic_folder_black_24dp); + //for tint + imageView.setColorFilter(ContextCompat.getColor(context,R.color.text_color_secondary)); + } else { /* File thumbnailFile = new File( filePaths[position].getParent() , "." diff --git a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java index d0681bd51773..6580d53e4a4c 100644 --- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java +++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java @@ -20,6 +20,7 @@ import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; import android.preference.PreferenceManager; +import android.support.v4.content.ContextCompat; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBarDrawerToggle; @@ -730,6 +731,8 @@ public class LibreOfficeUIActivity extends AppCompatActivity { LayoutInflater inflater = (LayoutInflater) mContext.getSystemService( Context.LAYOUT_INFLATER_SERVICE); + Context context = inflater.getContext(); + View listItem; if (convertView == null) { @@ -808,7 +811,9 @@ public class LibreOfficeUIActivity extends AppCompatActivity { if (filePaths.get(position).isDirectory()) { //Eventually have thumbnails of each sub file on a black circle //For now just a folder icon - imageView.setImageResource(R.drawable.folder); + imageView.setImageResource(R.drawable.ic_folder_black_24dp); + //for tint + imageView.setColorFilter(ContextCompat.getColor(context,R.color.text_color_secondary)); } //imageView.setClickable(true); return listItem; |