Merge pull request #867 from nextcloud/showSearchViewHeaders
show correct header for searchViews & fix icon color and text for favorites
|
@ -12,11 +12,11 @@
|
|||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
id="svg4"
|
||||
sodipodi:docname="ic_star_light_grey.svg"
|
||||
sodipodi:docname="ic_star_light_yellow.svg"
|
||||
inkscape:version="0.92.1 r15371"
|
||||
inkscape:export-filename="C:\DEV\src\Android\Nextcloud\favourites\src\main\res\drawable-xxxhdpi\ic_star_light_grey.png"
|
||||
inkscape:export-xdpi="1152"
|
||||
inkscape:export-ydpi="1152">
|
||||
inkscape:export-filename="C:\DEV\src\Android\Nextcloud\showSearchViewHeaders\src\main\res\drawable-mdpi\ic_star_light_yellow.png"
|
||||
inkscape:export-xdpi="288"
|
||||
inkscape:export-ydpi="288">
|
||||
<metadata
|
||||
id="metadata10">
|
||||
<rdf:RDF>
|
||||
|
@ -25,6 +25,7 @@
|
|||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
|
@ -44,7 +45,7 @@
|
|||
id="namedview6"
|
||||
showgrid="false"
|
||||
inkscape:zoom="9.8333333"
|
||||
inkscape:cx="12"
|
||||
inkscape:cx="-42.61017"
|
||||
inkscape:cy="12"
|
||||
inkscape:window-x="-9"
|
||||
inkscape:window-y="-9"
|
||||
|
@ -53,5 +54,5 @@
|
|||
<path
|
||||
d="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z"
|
||||
id="path2"
|
||||
style="fill:#000000;fill-opacity:1;opacity:0.5" />
|
||||
style="fill:#ffcc00;fill-opacity:1;opacity:0.5" />
|
||||
</svg>
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
@ -658,7 +658,7 @@ public class ExtendedListFragment extends Fragment
|
|||
R.string.file_list_empty, R.drawable.ic_search_light_grey);
|
||||
} else if (searchType == SearchType.FAVORITE_SEARCH) {
|
||||
setMessageForEmptyList(R.string.file_list_empty_favorite_headline,
|
||||
R.string.file_list_empty_favorites_filter_list, R.drawable.ic_star_light_grey);
|
||||
R.string.file_list_empty_favorites_filter_list, R.drawable.ic_star_light_yellow);
|
||||
} else if (searchType == SearchType.VIDEO_SEARCH) {
|
||||
setMessageForEmptyList(R.string.file_list_empty_headline_server_search_videos,
|
||||
R.string.file_list_empty_text_videos, R.drawable.ic_list_empty_video);
|
||||
|
@ -676,7 +676,7 @@ public class ExtendedListFragment extends Fragment
|
|||
R.string.file_list_empty_search, R.drawable.ic_search_light_grey);
|
||||
} else if (searchType == SearchType.FAVORITE_SEARCH_FILTER) {
|
||||
setMessageForEmptyList(R.string.file_list_empty_headline_server_search,
|
||||
R.string.file_list_empty_favorites_filter, R.drawable.ic_star_light_grey);
|
||||
R.string.file_list_empty_favorites_filter, R.drawable.ic_star_light_yellow);
|
||||
} else if (searchType == SearchType.VIDEO_SEARCH_FILTER) {
|
||||
setMessageForEmptyList(R.string.file_list_empty_headline_server_search_videos,
|
||||
R.string.file_list_empty_text_videos_filter, R.drawable.ic_list_empty_video);
|
||||
|
|
|
@ -36,6 +36,7 @@ import android.os.Looper;
|
|||
import android.preference.PreferenceManager;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.annotation.StringRes;
|
||||
import android.support.design.widget.BottomNavigationView;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.support.v4.widget.SwipeRefreshLayout;
|
||||
|
@ -1268,6 +1269,7 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
|
|||
menuItemAddRemoveValue = MenuItemAddRemove.ADD_GRID_AND_SORT_WITH_SEARCH;
|
||||
if (getActivity() != null) {
|
||||
getActivity().invalidateOptionsMenu();
|
||||
setTitle(R.string.default_display_name_for_root_folder);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1335,6 +1337,33 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
|
|||
currentSearchType = SearchType.SHARED_FILTER;
|
||||
}
|
||||
|
||||
// set title
|
||||
if (getActivity() instanceof FileDisplayActivity) {
|
||||
switch (currentSearchType) {
|
||||
case FAVORITE_SEARCH:
|
||||
setTitle(R.string.drawer_item_favorites);
|
||||
break;
|
||||
case PHOTO_SEARCH:
|
||||
setTitle(R.string.drawer_item_photos);
|
||||
break;
|
||||
case VIDEO_SEARCH:
|
||||
setTitle(R.string.drawer_item_videos);
|
||||
break;
|
||||
case RECENTLY_ADDED_SEARCH:
|
||||
setTitle(R.string.drawer_item_recently_added);
|
||||
break;
|
||||
case RECENTLY_MODIFIED_SEARCH:
|
||||
setTitle(R.string.drawer_item_recently_modified);
|
||||
break;
|
||||
case SHARED_FILTER:
|
||||
setTitle(R.string.drawer_item_shared);
|
||||
break;
|
||||
default:
|
||||
setTitle(R.string.default_display_name_for_root_folder);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Runnable switchViewsRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -1426,6 +1455,10 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
|
|||
}
|
||||
}
|
||||
|
||||
private void setTitle(@StringRes int title) {
|
||||
((FileDisplayActivity) getActivity()).getSupportActionBar().setTitle(title);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
|
|
Before Width: | Height: | Size: 1.8 KiB |
BIN
src/main/res/drawable-hdpi/ic_star_light_yellow.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.2 KiB |
BIN
src/main/res/drawable-mdpi/ic_star_light_yellow.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.3 KiB |
BIN
src/main/res/drawable-xhdpi/ic_star_light_yellow.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 3.4 KiB |
BIN
src/main/res/drawable-xxhdpi/ic_star_light_yellow.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 4.7 KiB |
BIN
src/main/res/drawable-xxxhdpi/ic_star_light_yellow.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
|
@ -105,7 +105,7 @@
|
|||
<string name="local_file_list_empty">There are no files in this folder.</string>
|
||||
<string name="file_list_empty_headline_search">No results in this folder</string>
|
||||
<string name="file_list_empty_headline_server_search">No results</string>
|
||||
<string name="file_list_empty_favorite_headline">No favorites</string>
|
||||
<string name="file_list_empty_favorite_headline">No favorites yet</string>
|
||||
<string name="file_list_empty_shared_headline">Nothing shared yet</string>
|
||||
<string name="file_list_empty_shared">Files and folders you share will show up here</string>
|
||||
<string name="file_list_empty_headline_server_search_videos">No videos</string>
|
||||
|
|