This commit is contained in:
serso 2012-10-03 17:56:59 +04:00
parent 93412c7344
commit d27c49db32
2 changed files with 24 additions and 8 deletions

View File

@ -92,7 +92,9 @@ public class CalculatorActivityHelperImpl extends AbstractCalculatorHelper imple
actionBar.setDisplayShowHomeEnabled(true);
toggleTitle(activity, true);
actionBar.setIcon(R.drawable.icon_action_bar);
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
}
private void toggleTitle(@NotNull SherlockFragmentActivity activity, boolean showTitle) {
@ -181,8 +183,6 @@ public class CalculatorActivityHelperImpl extends AbstractCalculatorHelper imple
int parentViewId) {
final ActionBar actionBar = activity.getSupportActionBar();
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
final ActionBar.Tab tab = actionBar.newTab();
tab.setTag(tag);
tab.setText(captionResId);

View File

@ -1,5 +1,6 @@
package org.solovyev.android.calculator;
import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
@ -26,6 +27,11 @@ public abstract class CalculatorFragment extends SherlockFragment {
fragmentHelper = CalculatorApplication.getInstance().createFragmentHelper(fragmentType.getDefaultLayoutId(), fragmentType.getDefaultTitleResId());
}
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -45,12 +51,6 @@ public abstract class CalculatorFragment extends SherlockFragment {
fragmentHelper.onViewCreated(this, view);
}
@Override
public void onDestroy() {
fragmentHelper.onDestroy(this);
super.onDestroy();
}
@Override
public void onResume() {
super.onResume();
@ -64,4 +64,20 @@ public abstract class CalculatorFragment extends SherlockFragment {
super.onPause();
}
@Override
public void onDestroyView() {
super.onDestroyView();
}
@Override
public void onDestroy() {
fragmentHelper.onDestroy(this);
super.onDestroy();
}
@Override
public void onDetach() {
super.onDetach();
}
}