mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Added Javadocs for CategorizationFragment
This commit is contained in:
parent
daf10e29a3
commit
a71c324af1
1 changed files with 15 additions and 1 deletions
|
|
@ -96,6 +96,10 @@ public class CategorizationFragment extends SherlockFragment{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves recently-used categories and nearby categories, and merges them without duplicates.
|
||||||
|
* @return a list containing these categories
|
||||||
|
*/
|
||||||
protected ArrayList<String> recentCatQuery() {
|
protected ArrayList<String> recentCatQuery() {
|
||||||
ArrayList<String> items = new ArrayList<String>();
|
ArrayList<String> items = new ArrayList<String>();
|
||||||
Set<String> mergedItems = new LinkedHashSet<String>();
|
Set<String> mergedItems = new LinkedHashSet<String>();
|
||||||
|
|
@ -133,7 +137,11 @@ public class CategorizationFragment extends SherlockFragment{
|
||||||
return mergedItemsList;
|
return mergedItemsList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Displays categories found to the user as they type in the search box
|
||||||
|
* @param categories a list of all categories found for the search string
|
||||||
|
* @param filter the search string
|
||||||
|
*/
|
||||||
protected void setCatsAfterAsync(ArrayList<String> categories, String filter) {
|
protected void setCatsAfterAsync(ArrayList<String> categories, String filter) {
|
||||||
|
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
|
|
@ -338,6 +346,12 @@ public class CategorizationFragment extends SherlockFragment{
|
||||||
return rootView;
|
return rootView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Makes asynchronous calls to the Commons MediaWiki API via anonymous subclasses of
|
||||||
|
* 'MethodAUpdater' and 'PrefixUpdater'. Some of their methods are overridden to implement
|
||||||
|
* more specialized behaviour to aggregate the results. A CountDownLatch is used to ensure that
|
||||||
|
* MethodA results are shown above Prefix results.
|
||||||
|
*/
|
||||||
private void requestSearchResults() {
|
private void requestSearchResults() {
|
||||||
|
|
||||||
final CountDownLatch latch = new CountDownLatch(1);
|
final CountDownLatch latch = new CountDownLatch(1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue