diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-05-11 17:17:36 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-05-11 17:17:36 -0700 |
commit | c4209a33ff1f6faf91aed16183fac064fdba0cde (patch) | |
tree | 724ca036d805ad94f8cb7e20aa22d105940110cb /subsonic-android/src/github | |
parent | 8ca3f80b8dda1725439469936c0731a9c3463da8 (diff) | |
download | dsub-c4209a33ff1f6faf91aed16183fac064fdba0cde.tar.gz dsub-c4209a33ff1f6faf91aed16183fac064fdba0cde.tar.bz2 dsub-c4209a33ff1f6faf91aed16183fac064fdba0cde.zip |
Added subtitle support from fragment
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;
}
|