Skip to content

Commit

Permalink
Update activities
Browse files Browse the repository at this point in the history
  • Loading branch information
avazirna committed Sep 4, 2023
1 parent 7c6ee03 commit d76e12a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
5 changes: 0 additions & 5 deletions app/src/org/commcare/activities/CommCareActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -731,11 +731,6 @@ protected void tryToAddSearchActionToAppBar(AppCompatActivity activity, Menu men
instantiator.onActionBarFound(searchMenuItem, searchView, barcodeItem);
}
}

View bottomSearchWidget = activity.findViewById(org.commcare.dalvik.R.id.searchfooter);
if (bottomSearchWidget != null) {
bottomSearchWidget.setVisibility(View.GONE);
}
}

/**
Expand Down
18 changes: 0 additions & 18 deletions app/src/org/commcare/activities/FormRecordListActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.os.PowerManager;
import android.text.Editable;
Expand All @@ -18,12 +17,9 @@
import android.widget.AdapterView.OnItemClickListener;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;

import org.commcare.CommCareApplication;
Expand Down Expand Up @@ -85,7 +81,6 @@ public class FormRecordListActivity extends SessionAwareCommCareActivity<FormRec

private int initialSelection = -1;

private EditText searchbox;
private ListView listView;
private SearchView searchView;
private MenuItem searchItem;
Expand Down Expand Up @@ -157,24 +152,17 @@ public void onCreateSessionSafe(Bundle savedInstanceState) {
setContentView(R.layout.entity_select_layout);
findViewById(R.id.entity_select_loading).setVisibility(View.GONE);

searchbox = findViewById(R.id.searchbox);
LinearLayout header = findViewById(R.id.entity_select_header);
ImageButton barcodeButton = findViewById(R.id.barcodeButton);

Spinner filterSelect = findViewById(R.id.entity_select_filter_dropdown);

listView = findViewById(R.id.screen_entity_select_list);
listView.setOnItemClickListener(this);

header.setVisibility(View.GONE);
barcodeButton.setVisibility(View.GONE);

barcodeScanOnClickListener = v -> callBarcodeScanIntent(FormRecordListActivity.this);

TextView searchLabel = findViewById(R.id.screen_entity_select_search_label);
searchLabel.setText(this.localize("select.search.label"));

searchbox.addTextChangedListener(this);
FormRecordLoaderTask task = new FormRecordLoaderTask(this, CommCareApplication.instance().getUserStorage(SessionStateDescriptor.class), platform);
task.addListener(this);

Expand Down Expand Up @@ -336,8 +324,6 @@ private void attachToPurgeTask() {
private void setSearchEnabled(boolean enabled) {
if (isUsingActionBar()) {
searchView.setEnabled(enabled);
} else {
searchbox.setEnabled(enabled);
}
}

Expand Down Expand Up @@ -496,7 +482,6 @@ private void setSearchText(CharSequence text) {
MenuItemCompat.expandActionView(searchItem);
searchView.setQuery(text, false);
}
searchbox.setText(text);
}

@Override
Expand Down Expand Up @@ -627,9 +612,6 @@ public int getWakeLockLevel() {
@Override
public void afterTextChanged(Editable s) {
String filtertext = s.toString();
if (searchbox.getText() == s) {
adapter.applyTextFilter(filtertext);
}
if (!isUsingActionBar()) {
lastQueryString = filtertext;
}
Expand Down

0 comments on commit d76e12a

Please sign in to comment.