empty list tweaks for #445

This commit is contained in:
AndyScherzinger 2016-12-13 17:26:46 +01:00
parent 20010d1d92
commit 99d630bdf4
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
29 changed files with 349 additions and 65 deletions

View file

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="16"
width="16"
version="1"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="ic_list_empty_create_folder.svg"
inkscape:export-filename="C:\DEV\src\Android\Nextcloud\designTweaks\res\drawable-mdpi\ic_list_empty_create_folder.png"
inkscape:export-xdpi="405"
inkscape:export-ydpi="405">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1005"
id="namedview6"
showgrid="false"
inkscape:zoom="29.5"
inkscape:cx="-12.171603"
inkscape:cy="13.899981"
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<path
style="fill:#99cde9;fill-opacity:1"
d="M 1.4570312 1.9960938 C 1.2070312 1.9960938 0.99609375 2.2070313 0.99609375 2.4570312 L 0.99609375 13.537109 C 0.99609375 13.797109 1.1990312 13.996094 1.4570312 13.996094 L 14.537109 13.996094 C 14.795109 13.996094 14.996094 13.797109 14.996094 13.537109 L 14.996094 4.4609375 C 14.996094 4.2109375 14.787109 3.9960937 14.537109 3.9960938 L 7.9960938 3.9960938 L 5.9960938 1.9960938 L 1.4570312 1.9960938 z M 9.9707031 6.2363281 L 11.306641 6.2363281 L 11.306641 8.25 L 13.314453 8.25 L 13.314453 9.5859375 L 11.306641 9.5859375 L 11.306641 11.589844 L 9.9707031 11.589844 L 9.9707031 9.5859375 L 7.9589844 9.5859375 L 7.9589844 8.25 L 9.9707031 8.25 L 9.9707031 6.2363281 z "
id="path4" />
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="16"
width="16"
version="1"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="list_empty_folder_empty.svg"
inkscape:export-filename="C:\DEV\src\Android\Nextcloud\designTweaks\res\drawable-mdpi\ic_folder_empty.png"
inkscape:export-xdpi="405"
inkscape:export-ydpi="405">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1005"
id="namedview6"
showgrid="false"
inkscape:zoom="14.75"
inkscape:cx="-10.20339"
inkscape:cy="8"
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<path
d="M1.457 1.997c-.25 0-.46.21-.46.46v11.08c0 .26.202.46.46.46h13.08c.258 0 .46-.2.46-.46V4.46c0-.25-.21-.463-.46-.463h-6.54l-2-2z"
fill-rule="evenodd"
fill="#0082c9"
id="path4"
style="fill:#99cde9;fill-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
width="24"
height="24"
viewBox="0 0 24 24"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="ic_list_empty_upload.svg"
inkscape:export-filename="C:\DEV\src\Android\Nextcloud\designTweaks\res\drawable-xxxhdpi\ic_list_empty_upload.png"
inkscape:export-xdpi="1080"
inkscape:export-ydpi="1080">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1005"
id="namedview6"
showgrid="false"
inkscape:zoom="9.8333333"
inkscape:cx="-15.305085"
inkscape:cy="12"
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<path
d="M9,16V10H5L12,3L19,10H15V16H9M5,20V18H19V20H5Z"
id="path4"
style="fill:#99cde9;fill-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 888 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 679 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 782 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

68
res/layout/empty_list.xml Normal file
View file

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Nextcloud Android client application
Copyright (C) 2016 Andy Scherzinger
Copyright (C) 2016 Nextcloud.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
License as published by the Free Software Foundation; either
version 3 of the License, or any later version.
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 AFFERO GENERAL PUBLIC LICENSE for more details.
You should have received a copy of the GNU Affero General Public
License along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<LinearLayout android:id="@+id/empty_list_view"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="@dimen/standard_margin"
android:gravity="center_vertical|center_horizontal"
android:orientation="vertical"
android:paddingBottom="@dimen/standard_double_margin">
<ImageView
android:id="@+id/empty_list_icon"
android:layout_width="72dp"
android:layout_height="72dp"
android:contentDescription="@string/file_list_folder"
android:src="@drawable/ic_list_empty_folder"/>
<ProgressBar
android:id="@+id/empty_list_progress"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_gravity="center_horizontal"
android:visibility="gone"/>
<TextView
android:id="@+id/empty_list_view_headline"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:ellipsize="end"
android:gravity="center"
android:maxLines="2"
android:paddingBottom="@dimen/standard_padding"
android:paddingTop="@dimen/standard_padding"
android:text="@string/file_list_empty_headline"
android:textSize="26sp"/>
<TextView
android:id="@+id/empty_list_view_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:ellipsize="end"
android:gravity="center"
android:maxLines="3"
android:text="@string/file_list_empty"/>
</LinearLayout>

View file

@ -60,8 +60,8 @@
<ProgressBar
android:id="@+id/folderSyncProgressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_gravity="center_horizontal"/>
<TextView
@ -71,8 +71,7 @@
android:layout_gravity="center_horizontal"
android:layout_margin="@dimen/standard_half_margin"
android:text="@string/folder_sync_loading_folders"
android:textColor="@color/secondaryTextColor"
android:textStyle="italic"/>
android:textSize="26sp"/>
</LinearLayout>
<TextView
@ -82,7 +81,6 @@
android:layout_gravity="center"
android:layout_margin="@dimen/standard_margin"
android:gravity="center"
android:textColor="@color/secondaryTextColor"
android:text="@string/folder_sync_no_results"
android:visibility="gone" />
</FrameLayout>

View file

@ -74,14 +74,9 @@
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/empty_list_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center_vertical|center_horizontal"
android:text="@string/empty"
android:visibility="visible" />
<include layout="@layout/empty_list" />
</ScrollView>
</android.support.v4.widget.SwipeRefreshLayout>

View file

@ -31,14 +31,7 @@ EXCEPT: ExpandableListView must be used for @+id/swipe_refresh_files_emptyView
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/empty_list_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical|center_horizontal"
android:text="@string/empty"
android:layout_gravity="center"
android:visibility="visible" />
<include layout="@layout/empty_list" />
</ScrollView>
</android.support.v4.widget.SwipeRefreshLayout>

View file

@ -78,11 +78,13 @@
<string name="uploader_upload_files_behaviour_only_upload">Keep file in source folder</string>
<string name="uploader_upload_files_behaviour_upload_and_delete_from_source">Delete file from source folder</string>
<string name="file_list_seconds_ago">seconds ago</string>
<string name="file_list_empty">Nothing in here. Upload something!</string>
<string name="file_list_empty_headline">No files in here</string>
<string name="file_list_empty">Upload some content or sync with your devices!</string>
<string name="file_list_loading">Loading&#8230;</string>
<string name="file_list_no_app_for_file_type">No app found for file type!</string>
<string name="local_file_list_empty">There are no files in this folder.</string>
<string name="upload_list_empty">No uploads available.</string>
<string name="upload_list_empty_headline">No uploads available</string>
<string name="upload_list_empty_text">Upload some content or activate instant upload!</string>
<string name="file_list_folder">folder</string>
<string name="file_list_folders">folders</string>
<string name="file_list_file">file</string>

View file

@ -1099,12 +1099,11 @@ public class FileDisplayActivity extends HookActivity
private void setBackgroundText() {
OCFileListFragment ocFileListFragment = getListOfFilesFragment();
if (ocFileListFragment != null) {
int message = R.string.file_list_loading;
if (!mSyncInProgress) {
// In case file list is empty
message = R.string.file_list_empty;
ocFileListFragment.setEmptyListMessage();
} else {
ocFileListFragment.setEmptyListLoadingMessage();
}
ocFileListFragment.setMessageForEmptyList(getString(message));
} else {
Log_OC.e(TAG, "OCFileListFragment is null");
}
@ -1117,7 +1116,6 @@ public class FileDisplayActivity extends HookActivity
/**
* Once the file upload has finished -> update view
*
* @author David A. Velasco
* {@link BroadcastReceiver} to enable upload feedback in UI
*/
@Override

View file

@ -38,7 +38,6 @@ import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.Toast;
import com.owncloud.android.R;
@ -164,12 +163,15 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
private void setBackgroundText() {
OCFileListFragment listFragment = getListOfFilesFragment();
if (listFragment != null) {
int message = R.string.file_list_loading;
if (!mSyncInProgress) {
// In case folder list is empty
message = R.string.file_list_empty_moving;
listFragment.setMessageForEmptyList(
R.string.file_list_empty_headline,
R.string.file_list_empty_moving,
R.drawable.ic_list_empty_create_folder
);
} else {
listFragment.setEmptyListLoadingMessage();
}
listFragment.setMessageForEmptyList(getString(message));
} else {
Log.e(TAG, "OCFileListFragment is null");
}

View file

@ -28,7 +28,6 @@ import android.view.ViewGroup;
import android.widget.ExpandableListAdapter;
import android.widget.ExpandableListView;
import android.widget.ExpandableListView.OnChildClickListener;
import android.widget.TextView;
import com.owncloud.android.R;
import com.owncloud.android.lib.common.utils.Log_OC;
@ -56,7 +55,8 @@ public class ExpandableListFragment extends ExtendedListFragment implements OnCh
Log_OC.e(TAG, "onCreateView");
View v = inflater.inflate(R.layout.list_fragment_expandable, null);
mEmptyListMessage = (TextView) v.findViewById(R.id.empty_list_view);
setupEmptyList(v);
mList = (ExpandableListView)(v.findViewById(R.id.list_root));
mList.setOnChildClickListener(this);
@ -86,5 +86,4 @@ public class ExpandableListFragment extends ExtendedListFragment implements OnCh
Log_OC.e(TAG, "onChildClick(). This method should be overriden!");
return false;
}
}

View file

@ -21,6 +21,8 @@
package com.owncloud.android.ui.fragment;
import android.os.Bundle;
import android.support.annotation.DrawableRes;
import android.support.annotation.StringRes;
import android.support.v4.app.Fragment;
import android.support.v4.view.MenuItemCompat;
import android.support.v4.widget.SwipeRefreshLayout;
@ -35,7 +37,9 @@ import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.GridView;
import android.widget.ListAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.getbase.floatingactionbutton.FloatingActionButton;
@ -67,7 +71,11 @@ public class ExtendedListFragment extends Fragment
protected SwipeRefreshLayout mRefreshListLayout;
private SwipeRefreshLayout mRefreshGridLayout;
protected SwipeRefreshLayout mRefreshEmptyLayout;
protected LinearLayout mEmptyListContainer;
protected TextView mEmptyListMessage;
protected TextView mEmptyListHeadline;
protected ImageView mEmptyListIcon;
protected ProgressBar mEmptyListProgress;
private FloatingActionsMenu mFabMain;
private FloatingActionButton mFabUpload;
@ -164,10 +172,10 @@ public class ExtendedListFragment extends Fragment
Log_OC.d(TAG, "onCreateView");
View v = inflater.inflate(R.layout.list_fragment, null);
setupEmptyList(v);
mListView = (ExtendedListView)(v.findViewById(R.id.list_root));
mListView.setOnItemClickListener(this);
//mListView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE_MODAL);
mListFooterView = inflater.inflate(R.layout.list_footer, null, false);
mGridView = (GridViewWithHeaderAndFooter) (v.findViewById(R.id.grid_root));
@ -180,7 +188,6 @@ public class ExtendedListFragment extends Fragment
mRefreshListLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_containing_list);
mRefreshGridLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_containing_grid);
mRefreshEmptyLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_containing_empty);
mEmptyListMessage = (TextView) v.findViewById(R.id.empty_list_view);
onCreateSwipeToRefresh(mRefreshListLayout);
onCreateSwipeToRefresh(mRefreshGridLayout);
@ -212,6 +219,14 @@ public class ExtendedListFragment extends Fragment
return v;
}
protected void setupEmptyList(View view) {
mEmptyListContainer = (LinearLayout) view.findViewById(R.id.empty_list_view);
mEmptyListMessage = (TextView) view.findViewById(R.id.empty_list_view_text);
mEmptyListHeadline = (TextView) view.findViewById(R.id.empty_list_view_headline);
mEmptyListIcon = (ImageView) view.findViewById(R.id.empty_list_icon);
mEmptyListProgress = (ProgressBar) view.findViewById(R.id.empty_list_progress);
}
/**
* {@inheritDoc}
*/
@ -227,9 +242,9 @@ public class ExtendedListFragment extends Fragment
setMessageForEmptyList(savedInstanceState.getString(KEY_EMPTY_LIST_MESSAGE));
} else {
mIndexes = new ArrayList<Integer>();
mFirstPositions = new ArrayList<Integer>();
mTops = new ArrayList<Integer>();
mIndexes = new ArrayList<>();
mFirstPositions = new ArrayList<>();
mTops = new ArrayList<>();
mHeightCell = 0;
}
}
@ -361,7 +376,7 @@ public class ExtendedListFragment extends Fragment
/**
* Sets the 'visibility' state of the FAB contained in the fragment.
*
* When 'false' is set, FAB visibility is set to View.GONE programatically,
* When 'false' is set, FAB visibility is set to View.GONE programmatically,
*
* @param enabled Desired visibility for the FAB.
*/
@ -374,27 +389,67 @@ public class ExtendedListFragment extends Fragment
}
/**
* Set message for empty list view
* Set message for empty list view.
*/
public void setMessageForEmptyList(String message) {
if (mEmptyListMessage != null) {
if (mEmptyListContainer != null && mEmptyListMessage != null) {
mEmptyListMessage.setText(message);
}
}
/**
* Get the text of EmptyListMessage TextView
* displays an empty list information with a headline, a message and an icon.
*
* @return String
* @param headline the headline
* @param message the message
* @param icon the icon to be shown
*/
public void setMessageForEmptyList(@StringRes int headline, @StringRes int message, @DrawableRes int icon) {
if (mEmptyListContainer != null && mEmptyListMessage != null) {
mEmptyListHeadline.setText(headline);
mEmptyListMessage.setText(message);
mEmptyListIcon.setImageResource(icon);
mEmptyListIcon.setVisibility(View.VISIBLE);
mEmptyListProgress.setVisibility(View.GONE);
}
}
/**
* Set message for empty list view.
*/
public void setEmptyListMessage() {
setMessageForEmptyList(
R.string.file_list_empty_headline,
R.string.file_list_empty,
R.drawable.ic_list_empty_folder
);
}
/**
* Set message for empty list view.
*/
public void setEmptyListLoadingMessage() {
if (mEmptyListContainer != null && mEmptyListMessage != null) {
mEmptyListMessage.setText(R.string.file_list_loading);
mEmptyListIcon.setVisibility(View.GONE);
mEmptyListProgress.setVisibility(View.VISIBLE);
}
}
/**
* Get the text of EmptyListMessage TextView.
*
* @return String empty text view text-value
*/
public String getEmptyViewText() {
return (mEmptyListMessage != null) ? mEmptyListMessage.getText().toString() : "";
return (mEmptyListContainer != null && mEmptyListMessage != null) ? mEmptyListMessage.getText().toString() : "";
}
protected void onCreateSwipeToRefresh(SwipeRefreshLayout refreshLayout) {
// Colors in animations
refreshLayout.setColorSchemeResources(R.color.color_accent, R.color.primary,
R.color.primary_dark);
refreshLayout.setColorSchemeResources(R.color.color_accent, R.color.primary, R.color.primary_dark);
refreshLayout.setOnRefreshListener(this);
}
@ -424,7 +479,7 @@ public class ExtendedListFragment extends Fragment
* TODO doc
* To be called before setAdapter, or GridViewWithHeaderAndFooter will throw an exception
*
* @param enabled
* @param enabled flag if footer should be shown/calculated
*/
protected void setFooterEnabled(boolean enabled) {
if (enabled) {
@ -451,8 +506,9 @@ public class ExtendedListFragment extends Fragment
}
/**
* TODO doc
* @param text
* set the list/grid footer text.
*
* @param text the footer text
*/
protected void setFooterText(String text) {
if (text != null && text.length() > 0) {

View file

@ -20,9 +20,6 @@
*/
package com.owncloud.android.ui.fragment;
import java.io.File;
import java.util.ArrayList;
import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
@ -40,6 +37,9 @@ import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.ui.adapter.LocalFileListAdapter;
import com.owncloud.android.utils.FileStorageUtils;
import java.io.File;
import java.util.ArrayList;
/**
* A Fragment that lists all files and folders in a given LOCAL path.
@ -87,7 +87,9 @@ public class LocalFileListFragment extends ExtendedListFragment {
setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
setSwipeEnabled(false); // Disable pull-to-refresh
setFabEnabled(false); // Disable FAB
setMessageForEmptyList(getString(R.string.local_file_list_empty));
setMessageForEmptyList(
R.string.file_list_empty_headline, R.string.local_file_list_empty, R.drawable.ic_list_empty_folder
);
Log_OC.i(TAG, "onCreateView() end");
return v;
}

View file

@ -35,14 +35,13 @@ import com.owncloud.android.ui.adapter.ExpandableUploadListAdapter;
/**
* A Fragment that lists all files and folders in a given LOCAL path.
*
*/
public class UploadListFragment extends ExpandableListFragment {
private static final String TAG = UploadListFragment.class.getSimpleName();
/**
* Reference to the Activity which this fragment is attached to. For
* callbacks
* Reference to the Activity which this fragment is attached to.
* For callbacks.
*/
private UploadListFragment.ContainerActivity mContainerActivity;
@ -63,7 +62,9 @@ public class UploadListFragment extends ExpandableListFragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = super.onCreateView(inflater, container, savedInstanceState);
getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
setMessageForEmptyList(getString(R.string.upload_list_empty));
setMessageForEmptyList(
R.string.upload_list_empty_headline, R.string.upload_list_empty_text, R.drawable.ic_list_empty_upload
);
setOnRefreshListener(this);
return v;
}
@ -128,11 +129,10 @@ public class UploadListFragment extends ExpandableListFragment {
* Callback method invoked when an upload item is clicked by the user on
* the upload list
*
* @param file
* @param file the file that has been clicked on.
* @return return true if click was handled.
*/
public boolean onUploadItemClick(OCUpload file);
}
public void binderReady(){
@ -148,5 +148,4 @@ public class UploadListFragment extends ExpandableListFragment {
mAdapter.refreshView();
}
}
}