Merge pull request #10 from brion/flash-text

Fix flash of descriptive text before recent cats shown
This commit is contained in:
Yuvi Panda 2013-04-26 05:30:57 -07:00
commit 6a7b0c9ae0
2 changed files with 6 additions and 8 deletions

View file

@ -51,6 +51,7 @@
android:gravity="center"
android:focusable="true"
android:text="@string/categories_skip_explanation"
android:visibility="gone"
/>
<ListView

View file

@ -96,11 +96,8 @@ public class CategorizationFragment extends SherlockFragment{
categoriesSearchInProgress.setVisibility(View.VISIBLE);
categoriesNotFoundView.setVisibility(View.GONE);
if(!TextUtils.isEmpty(filter)) {
// Only hide this on first count of non-empty filter
categoriesSkip.setVisibility(View.GONE);
}
}
@Override
protected void onPostExecute(ArrayList<String> categories) {
@ -122,13 +119,13 @@ public class CategorizationFragment extends SherlockFragment{
categoriesAdapter.notifyDataSetInvalidated();
categoriesSearchInProgress.setVisibility(View.GONE);
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.setVisibility(View.VISIBLE);
}
} else {
// If we found recent cats, hide the skip message!
categoriesSkip.setVisibility(View.GONE);
}
}