Merge help and feedback into one menu item

This commit is contained in:
Jimmy Shih
2014-01-08 14:36:34 -08:00
parent 7f124aa76b
commit 33886cc2ad
15 changed files with 47 additions and 36 deletions
@@ -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>