Skip to content

Commit

Permalink
-replace the name
Browse files Browse the repository at this point in the history
  • Loading branch information
pm-dimagi committed Jan 17, 2025
1 parent 83934e4 commit c322bb1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/res/menu/action_bar_search_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
app:showAsAction="collapseActionView|ifRoom"
app:actionViewClass="androidx.appcompat.widget.SearchView"/>
<item
android:id="@+id/barcode_scan_action_bar"
android:id="@+id/highlight_action_bar"
android:title="Scan Barcode"
android:icon="@drawable/startup_barcode"
app:showAsAction="ifRoom"/>
Expand Down
2 changes: 1 addition & 1 deletion app/src/org/commcare/activities/CommCareActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ protected void tryToAddSearchActionToAppBar(AppCompatActivity activity, Menu men

MenuItem searchMenuItem = menu.findItem(org.commcare.dalvik.R.id.search_action_bar);
SearchView searchView = (SearchView)searchMenuItem.getActionView();
MenuItem barcodeItem = menu.findItem(org.commcare.dalvik.R.id.barcode_scan_action_bar);
MenuItem barcodeItem = menu.findItem(org.commcare.dalvik.R.id.highlight_action_bar);
if (searchView != null) {
if (instantiator != null) {
instantiator.onActionBarFound(searchMenuItem, searchView, barcodeItem);
Expand Down
4 changes: 2 additions & 2 deletions app/src/org/commcare/activities/EntitySelectActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ public boolean onPrepareOptionsMenu(Menu menu) {
// hide sorting menu when using async loading strategy
menu.findItem(MENU_SORT).setVisible((shortSelect == null || shortSelect.hasSortField()));
if(isMappingEnabled) {
menu.findItem(R.id.barcode_scan_action_bar).setIcon(R.drawable.ic_marker);
menu.findItem(R.id.highlight_action_bar).setIcon(R.drawable.ic_marker);
}

if (menu.findItem(R.id.menu_settings) != null) {
Expand All @@ -769,7 +769,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
return true;
// handling click on the barcode scanner's actionbar
// trying to set the onclicklistener in its view in the onCreateOptionsMenu method does not work because it returns null
case R.id.barcode_scan_action_bar:
case R.id.highlight_action_bar:
if(isMappingEnabled){
Intent intent = new Intent(this,
HiddenPreferences.shouldUseMapboxMap() ? EntityMapboxActivity.class : EntityMapActivity.class);
Expand Down
3 changes: 1 addition & 2 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 Down Expand Up @@ -580,7 +579,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
case MENU_SUBMIT_QUARANTINE_REPORT:
generateQuarantineReport();
return true;
case R.id.barcode_scan_action_bar:
case R.id.highlight_action_bar:
barcodeScanOnClickListener.onClick(null);
return true;
case R.id.menu_settings:
Expand Down

0 comments on commit c322bb1

Please sign in to comment.