mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Add descriptive text to tell people how to skip categorization
This commit is contained in:
parent
0176995612
commit
264483838c
3 changed files with 28 additions and 0 deletions
|
|
@ -37,6 +37,16 @@
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/categoriesExplanation"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_marginTop="48dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:focusable="true"
|
||||||
|
android:text="@string/categories_skip_explanation"
|
||||||
|
/>
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
android:id="@+id/categoriesListBox"
|
android:id="@+id/categoriesListBox"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
|
||||||
|
|
@ -70,4 +70,9 @@
|
||||||
</plurals>
|
</plurals>
|
||||||
|
|
||||||
<string name="categories_not_found">No categories matching %1$s found</string>
|
<string name="categories_not_found">No categories matching %1$s found</string>
|
||||||
|
<string name="categories_skip_explanation">
|
||||||
|
Add categories to make the image more discoverable on Wikimedia Commons.\n\n
|
||||||
|
Start typing to add categories.\n
|
||||||
|
Tap this message (or hit back) to skip this step.
|
||||||
|
</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ public class CategorizationFragment extends SherlockFragment{
|
||||||
EditText categoriesFilter;
|
EditText categoriesFilter;
|
||||||
ProgressBar categoriesSearchInProgress;
|
ProgressBar categoriesSearchInProgress;
|
||||||
TextView categoriesNotFoundView;
|
TextView categoriesNotFoundView;
|
||||||
|
TextView categoriesSkip;
|
||||||
|
|
||||||
CategoriesAdapter categoriesAdapter;
|
CategoriesAdapter categoriesAdapter;
|
||||||
CategoriesUpdater lastUpdater = null;
|
CategoriesUpdater lastUpdater = null;
|
||||||
|
|
@ -87,6 +88,11 @@ public class CategorizationFragment extends SherlockFragment{
|
||||||
filter = categoriesFilter.getText().toString();
|
filter = categoriesFilter.getText().toString();
|
||||||
categoriesSearchInProgress.setVisibility(View.VISIBLE);
|
categoriesSearchInProgress.setVisibility(View.VISIBLE);
|
||||||
categoriesNotFoundView.setVisibility(View.GONE);
|
categoriesNotFoundView.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
if(!TextUtils.isEmpty(filter)) {
|
||||||
|
// Only hide this on first count of non-empty filter
|
||||||
|
categoriesSkip.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -202,6 +208,13 @@ public class CategorizationFragment extends SherlockFragment{
|
||||||
categoriesFilter = (EditText) rootView.findViewById(R.id.categoriesSearchBox);
|
categoriesFilter = (EditText) rootView.findViewById(R.id.categoriesSearchBox);
|
||||||
categoriesSearchInProgress = (ProgressBar) rootView.findViewById(R.id.categoriesSearchInProgress);
|
categoriesSearchInProgress = (ProgressBar) rootView.findViewById(R.id.categoriesSearchInProgress);
|
||||||
categoriesNotFoundView = (TextView) rootView.findViewById(R.id.categoriesNotFound);
|
categoriesNotFoundView = (TextView) rootView.findViewById(R.id.categoriesNotFound);
|
||||||
|
categoriesSkip = (TextView) rootView.findViewById(R.id.categoriesExplanation);
|
||||||
|
|
||||||
|
categoriesSkip.setOnClickListener(new View.OnClickListener() {
|
||||||
|
public void onClick(View view) {
|
||||||
|
getActivity().finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
ArrayList<CategoryItem> items;
|
ArrayList<CategoryItem> items;
|
||||||
if(savedInstanceState == null) {
|
if(savedInstanceState == null) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue