Skip to content

Commit

Permalink
Added top bar title setting while searching in SearchActivity
Browse files Browse the repository at this point in the history
  • Loading branch information
zHd4 committed Jan 7, 2021
1 parent a61914b commit c0577dd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/src/main/java/com/notesr/views/SearchActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ protected void onCreate(Bundle savedInstanceState) {

ActivityTools.checkReady(getApplicationContext(), this);

ActionBar actionBar = getSupportActionBar();
final ActionBar actionBar = getSupportActionBar();

assert actionBar != null;

actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setTitle("");
actionBar.setTitle("Search");

final EditText queryField = findViewById(R.id.searchField);
Button searchButton = findViewById(R.id.searchButton);
Expand All @@ -41,6 +41,8 @@ public void onClick(View v) {
} catch (Exception exception) {
exception.printStackTrace();
}

actionBar.setTitle("Search Results");
}
}
});
Expand Down

0 comments on commit c0577dd

Please sign in to comment.