forked from upstream-mirrors/OpenTracks
Merge help and feedback into one menu item
This commit is contained in:
@@ -172,4 +172,11 @@ public class Api11Adapter extends Api10Adapter {
|
||||
public boolean hasDialogTitleDivider() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTitleAndSubtitle(Activity activity, String title, String subtitle) {
|
||||
ActionBar actionBar = activity.getActionBar();
|
||||
actionBar.setTitle(title);
|
||||
actionBar.setSubtitle(subtitle);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,6 +155,11 @@ public class Api8Adapter implements ApiAdapter {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTitleAndSubtitle(Activity activity, String title, String subtitle) {
|
||||
activity.setTitle(title + " " + subtitle);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleSearchKey(MenuItem menuItem) {
|
||||
// Return false and allow the framework to handle the search key.
|
||||
|
||||
@@ -192,6 +192,13 @@ public interface ApiAdapter {
|
||||
*/
|
||||
public boolean hasDialogTitleDivider();
|
||||
|
||||
/**
|
||||
* Sets title and subtitle.
|
||||
* <p>
|
||||
* Due to changes in API level 11;
|
||||
*/
|
||||
public void setTitleAndSubtitle(Activity activity, String title, String subtitle);
|
||||
|
||||
/**
|
||||
* Handles the search key press. Returns true if handled.
|
||||
* <p>
|
||||
|
||||
Reference in New Issue
Block a user