diff options
Diffstat (limited to 'subsonic-android/src/github')
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/activity/SubsonicActivity.java | 3 | ||||
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/fragments/SubsonicFragment.java | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicActivity.java index 6fd92eec..319b95a3 100644 --- a/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicActivity.java +++ b/subsonic-android/src/github/daneren2005/dsub/activity/SubsonicActivity.java @@ -177,6 +177,9 @@ public class SubsonicActivity extends SherlockFragmentActivity implements OnItem recreateSpinner();
}
}
+ public void setSubtitle(CharSequence title) {
+ getSupportActionBar().setSubtitle(title);
+ }
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
diff --git a/subsonic-android/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/subsonic-android/src/github/daneren2005/dsub/fragments/SubsonicFragment.java index 3d938dc9..3e6a1b39 100644 --- a/subsonic-android/src/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/subsonic-android/src/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -73,6 +73,7 @@ public class SubsonicFragment extends SherlockFragment { private static final String TAG = SubsonicFragment.class.getSimpleName();
protected SubsonicActivity context;
protected CharSequence title = "DSub";
+ protected CharSequence subtitle = null;
protected View rootView;
protected boolean primaryFragment = false;
protected boolean invalidated = false;
@@ -269,6 +270,7 @@ public class SubsonicFragment extends SherlockFragment { if(primary) {
if(context != null) {
context.setTitle(title);
+ context.setSubtitle(subtitle);
}
if(invalidated) {
invalidated = false;
@@ -337,6 +339,10 @@ public class SubsonicFragment extends SherlockFragment { this.title = context.getResources().getString(title);
context.setTitle(this.title);
}
+ public void setSubtitle(CharSequence title) {
+ this.subtitle = title;
+ context.setSubtitle(title);
+ }
public CharSequence getTitle() {
return this.title;
}
|