fix contextual actionbar for 2.x

This commit is contained in:
Andrew Dolgov 2011-12-09 22:28:37 +03:00
parent 8538dbd2a9
commit ff598602bd
3 changed files with 11 additions and 3 deletions

View File

@ -4,7 +4,7 @@
android:versionCode="39" android:versionCode="39"
android:versionName="0.3.6" > android:versionName="0.3.6" >
<uses-sdk android:minSdkVersion="4" /> <uses-sdk android:minSdkVersion="7" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

View File

@ -68,7 +68,9 @@ public class MainActivity extends FragmentActivity implements OnlineServices {
private SQLiteDatabase m_writableDb; private SQLiteDatabase m_writableDb;
private ActionMode m_headlinesActionMode; private ActionMode m_headlinesActionMode;
private ActionMode.Callback m_headlinesActionModeCallback = new ActionMode.Callback() { private HeadlinesActionModeCallback m_headlinesActionModeCallback;
private class HeadlinesActionModeCallback implements ActionMode.Callback {
@Override @Override
public boolean onPrepareActionMode(ActionMode mode, Menu menu) { public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
@ -484,6 +486,8 @@ public class MainActivity extends FragmentActivity implements OnlineServices {
if (!m_compatMode) { if (!m_compatMode) {
new TransitionHelper((LinearLayout) findViewById(R.id.main)); new TransitionHelper((LinearLayout) findViewById(R.id.main));
m_headlinesActionModeCallback = new HeadlinesActionModeCallback();
} }
if (m_isOffline) { if (m_isOffline) {

View File

@ -54,7 +54,9 @@ public class OfflineActivity extends FragmentActivity implements
} }
private ActionMode m_headlinesActionMode; private ActionMode m_headlinesActionMode;
private ActionMode.Callback m_headlinesActionModeCallback = new ActionMode.Callback() { private HeadlinesActionModeCallback m_headlinesActionModeCallback;
private class HeadlinesActionModeCallback implements ActionMode.Callback {
@Override @Override
public boolean onPrepareActionMode(ActionMode mode, Menu menu) { public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
@ -135,6 +137,8 @@ public class OfflineActivity extends FragmentActivity implements
if (!m_compatMode) { if (!m_compatMode) {
new TransitionHelper((LinearLayout) findViewById(R.id.main)); new TransitionHelper((LinearLayout) findViewById(R.id.main));
m_headlinesActionModeCallback = new HeadlinesActionModeCallback();
} }
initMainMenu(); initMainMenu();