Kaydet (Commit) f3eccc65 authored tarafından Jacobo Aragunde Pérez's avatar Jacobo Aragunde Pérez

tdf#87432: normal icons for folders in android doc browser

The code used to draw a black circle and populate it with thumbnails
of the documents inside the folder, but they are always empty because
we are not generating any thumbnails.

Change-Id: Id0b63f7e901525b5a962d12441cda84dfeb59d52
üst 1635dea5
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is part of the LibreOffice project.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<org.libreoffice.ui.FolderIconView
android:id="@+id/folder_icon"
android:layout_width="100dp"
android:layout_height="142dp"
android:paddingTop="15dp"
android:paddingBottom="10dp"
android:layout_gravity="center" >
</org.libreoffice.ui.FolderIconView>
<TextView
android:id="@+id/grid_item_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@+id/label"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:layout_gravity="center"
android:textSize="15dp"
android:textStyle="bold"
android:textColor="@android:color/secondary_text_light"
android:maxLines="2">
</TextView>
</LinearLayout>
\ No newline at end of file
...@@ -101,14 +101,6 @@ public class GridItemAdapter extends BaseAdapter { ...@@ -101,14 +101,6 @@ public class GridItemAdapter extends BaseAdapter {
{ {
// Default view is a generic folder icon. // Default view is a generic folder icon.
imageView.setImageResource(R.drawable.folder); imageView.setImageResource(R.drawable.folder);
// How should we handle empty folders / folders with no thumbnails? -> new files
gridView = inflater.inflate(R.layout.file_explorer_folder_icon, null);
org.libreoffice.ui.FolderIconView icon =
(org.libreoffice.ui.FolderIconView)gridView.findViewById(R.id.folder_icon);
// icon.setDir( filePaths[position]);
textView = (TextView) gridView.findViewById(R.id.grid_item_label);
textView.setText(filePaths.get(position).getName());
return gridView;
} }
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment