mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Fix flash of descriptive text before recent cats shown
Switch from hiding the "skip" text after looking up cats, to hiding it initially and showing it after doing the local search for recent cats.
This commit is contained in:
parent
e0e7f056d2
commit
c37b18509d
2 changed files with 6 additions and 8 deletions
|
|
@ -51,6 +51,7 @@
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:text="@string/categories_skip_explanation"
|
android:text="@string/categories_skip_explanation"
|
||||||
|
android:visibility="gone"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
|
|
|
||||||
|
|
@ -96,10 +96,7 @@ public class CategorizationFragment extends SherlockFragment{
|
||||||
categoriesSearchInProgress.setVisibility(View.VISIBLE);
|
categoriesSearchInProgress.setVisibility(View.VISIBLE);
|
||||||
categoriesNotFoundView.setVisibility(View.GONE);
|
categoriesNotFoundView.setVisibility(View.GONE);
|
||||||
|
|
||||||
if(!TextUtils.isEmpty(filter)) {
|
categoriesSkip.setVisibility(View.GONE);
|
||||||
// Only hide this on first count of non-empty filter
|
|
||||||
categoriesSkip.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -122,13 +119,13 @@ public class CategorizationFragment extends SherlockFragment{
|
||||||
categoriesAdapter.notifyDataSetInvalidated();
|
categoriesAdapter.notifyDataSetInvalidated();
|
||||||
categoriesSearchInProgress.setVisibility(View.GONE);
|
categoriesSearchInProgress.setVisibility(View.GONE);
|
||||||
if (categories.size() == 0) {
|
if (categories.size() == 0) {
|
||||||
if(!TextUtils.isEmpty(filter)) {
|
if(TextUtils.isEmpty(filter)) {
|
||||||
|
// If we found no recent cats, show the skip message!
|
||||||
|
categoriesSkip.setVisibility(View.VISIBLE);
|
||||||
|
} else {
|
||||||
categoriesNotFoundView.setText(getString(R.string.categories_not_found, filter));
|
categoriesNotFoundView.setText(getString(R.string.categories_not_found, filter));
|
||||||
categoriesNotFoundView.setVisibility(View.VISIBLE);
|
categoriesNotFoundView.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
// If we found recent cats, hide the skip message!
|
|
||||||
categoriesSkip.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue