Skip to content

Commit

Permalink
Fix search obs UI issues (fix #325)
Browse files Browse the repository at this point in the history
  • Loading branch information
budowski committed Apr 27, 2017
1 parent 77c1759 commit 22e342c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions iNaturalist/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.inaturalist.android"
android:versionCode="210"
android:versionName="1.5.13" >
android:versionCode="211"
android:versionName="1.5.14" >

<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="21"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ public void onCreate(Bundle savedInstanceState) {
public void onTextChanged(final CharSequence s, int start, int before, int count) {
if (s.length() == 0) {
mProgress.setVisibility(View.GONE);
mNoResults.setVisibility(View.GONE);
return;
} else {
getListView().setVisibility(View.VISIBLE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public class TaxonSearchActivity extends AppCompatActivity implements AdapterVie
private boolean mShowUnknown;

private long mLastTime = 0;
private TextView mNoResults;

@Override
protected void onStart()
Expand Down Expand Up @@ -227,7 +228,7 @@ protected FilterResults performFiltering(CharSequence constraint) {
if (constraint.length() == 0) {
filterResults.values = new ArrayList<JSONObject>();
filterResults.count = 0;

} else {
toggleLoading(true);

Expand Down Expand Up @@ -430,6 +431,9 @@ public void onCreate(Bundle savedInstanceState) {

mProgress = (ProgressBar) findViewById(R.id.progress);
mProgress.setVisibility(View.GONE);

mNoResults = (TextView) findViewById(android.R.id.empty);
mNoResults.setVisibility(View.GONE);

mAdapter = new TaxonAutoCompleteAdapter(getApplicationContext(), R.layout.taxon_result_item);
final EditText autoCompView = (EditText) customView.findViewById(R.id.search_text);
Expand Down

0 comments on commit 22e342c

Please sign in to comment.