|
|
|
@ -21,6 +21,7 @@ import android.support.v4.app.Fragment; |
|
|
|
|
import android.support.v4.app.FragmentTransaction; |
|
|
|
|
import android.support.v7.app.ActionBar; |
|
|
|
|
import android.support.v7.widget.Toolbar; |
|
|
|
|
import android.view.MenuItem; |
|
|
|
|
|
|
|
|
|
public class FavouritesActivity extends BaseActivity { |
|
|
|
|
@Override |
|
|
|
@ -33,6 +34,8 @@ public class FavouritesActivity extends BaseActivity { |
|
|
|
|
ActionBar bar = getSupportActionBar(); |
|
|
|
|
if (bar != null) { |
|
|
|
|
bar.setTitle(getString(R.string.title_favourites)); |
|
|
|
|
bar.setDisplayHomeAsUpEnabled(true); |
|
|
|
|
bar.setDisplayShowHomeEnabled(true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); |
|
|
|
@ -40,4 +43,15 @@ public class FavouritesActivity extends BaseActivity { |
|
|
|
|
fragmentTransaction.add(R.id.fragment_container, fragment); |
|
|
|
|
fragmentTransaction.commit(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean onOptionsItemSelected(MenuItem item) { |
|
|
|
|
switch (item.getItemId()) { |
|
|
|
|
case android.R.id.home: { |
|
|
|
|
onBackPressed(); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return super.onOptionsItemSelected(item); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|