Changes
This commit is contained in:
parent
93412c7344
commit
d27c49db32
@ -92,7 +92,9 @@ public class CalculatorActivityHelperImpl extends AbstractCalculatorHelper imple
|
|||||||
actionBar.setDisplayShowHomeEnabled(true);
|
actionBar.setDisplayShowHomeEnabled(true);
|
||||||
|
|
||||||
toggleTitle(activity, true);
|
toggleTitle(activity, true);
|
||||||
|
|
||||||
actionBar.setIcon(R.drawable.icon_action_bar);
|
actionBar.setIcon(R.drawable.icon_action_bar);
|
||||||
|
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void toggleTitle(@NotNull SherlockFragmentActivity activity, boolean showTitle) {
|
private void toggleTitle(@NotNull SherlockFragmentActivity activity, boolean showTitle) {
|
||||||
@ -181,8 +183,6 @@ public class CalculatorActivityHelperImpl extends AbstractCalculatorHelper imple
|
|||||||
int parentViewId) {
|
int parentViewId) {
|
||||||
final ActionBar actionBar = activity.getSupportActionBar();
|
final ActionBar actionBar = activity.getSupportActionBar();
|
||||||
|
|
||||||
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
|
|
||||||
|
|
||||||
final ActionBar.Tab tab = actionBar.newTab();
|
final ActionBar.Tab tab = actionBar.newTab();
|
||||||
tab.setTag(tag);
|
tab.setTag(tag);
|
||||||
tab.setText(captionResId);
|
tab.setText(captionResId);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package org.solovyev.android.calculator;
|
package org.solovyev.android.calculator;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -26,6 +27,11 @@ public abstract class CalculatorFragment extends SherlockFragment {
|
|||||||
fragmentHelper = CalculatorApplication.getInstance().createFragmentHelper(fragmentType.getDefaultLayoutId(), fragmentType.getDefaultTitleResId());
|
fragmentHelper = CalculatorApplication.getInstance().createFragmentHelper(fragmentType.getDefaultLayoutId(), fragmentType.getDefaultTitleResId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAttach(Activity activity) {
|
||||||
|
super.onAttach(activity);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
@ -45,12 +51,6 @@ public abstract class CalculatorFragment extends SherlockFragment {
|
|||||||
fragmentHelper.onViewCreated(this, view);
|
fragmentHelper.onViewCreated(this, view);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDestroy() {
|
|
||||||
fragmentHelper.onDestroy(this);
|
|
||||||
super.onDestroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
@ -64,4 +64,20 @@ public abstract class CalculatorFragment extends SherlockFragment {
|
|||||||
|
|
||||||
super.onPause();
|
super.onPause();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroyView() {
|
||||||
|
super.onDestroyView();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
fragmentHelper.onDestroy(this);
|
||||||
|
super.onDestroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDetach() {
|
||||||
|
super.onDetach();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user