Fixed actionBar title for stage info

This commit is contained in:
Denis 2014-09-26 15:15:08 +03:00
parent b815e4c364
commit 26ebf8587b
3 changed files with 9 additions and 7 deletions

View file

@ -37,9 +37,9 @@ public class SherpafyFavoriteFragment extends SherpafyStageInfoFragment {
int k = args.getInt(FAV_PARAM);
if (stage != null) {
fav = (StageFavorite) stage.getFavorites().get(k);
if (getSherlockActivity().getSupportActionBar() != null) {
getSherlockActivity().getSupportActionBar().setTitle(fav.getName());
}
// if (getSherlockActivity().getSupportActionBar() != null) {
// getSherlockActivity().getSupportActionBar().setTitle(fav.getName());
// }
}
}

View file

@ -59,9 +59,9 @@ public class SherpafyFavoritesListFragment extends SherlockListFragment {
@Override
public void onResume() {
super.onResume();
if(tour != null) {
getSherlockActivity().getSupportActionBar().setTitle(tour.getName());
}
// if(tour != null) {
// getSherlockActivity().getSupportActionBar().setTitle(tour.getName());
// }
}
@Override

View file

@ -62,7 +62,9 @@ public class SherpafyStageFragment extends SherlockFragment {
if(tour != null && tour.getStageInformation().size() > k) {
stage = tour.getStageInformation().get(k);
}
getSherlockActivity().getSupportActionBar().setTitle(getString(R.string.tab_stage) + " " + (k+1));
if (stage != null){
getSherlockActivity().getSupportActionBar().setTitle(stage.getName());
}
}