Skip to content

Commit

Permalink
updated for getMenuInflater
Browse files Browse the repository at this point in the history
  • Loading branch information
commonsguy committed Nov 18, 2013
1 parent 790e703 commit 0cae8fd
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions Progress/ActionBar/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
import android.widget.ArrayAdapter;
import com.actionbarsherlock.app.SherlockListActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
import com.actionbarsherlock.view.MenuItem;


public class ActionBarDemoActivity extends SherlockListActivity {
private static final String[] items= { "lorem", "ipsum", "dolor",
"sit", "amet", "consectetuer", "adipiscing", "elit", "morbi",
Expand All @@ -41,7 +41,7 @@ public void onCreate(Bundle icicle) {

@Override
public boolean onCreateOptionsMenu(Menu menu) {
new MenuInflater(this).inflate(R.menu.actions, menu);
getSupportMenuInflater().inflate(R.menu.actions, menu);

refresh=menu.findItem(R.id.refresh);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
import android.content.IntentFilter;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RemoteViews;


public class RemoteViewsHostActivity extends Activity {
public static final String ACTION_CALL_FOR_PLUGINS=
"com.commonsware.android.rv.host.CALL_FOR_PLUGINS";
Expand Down Expand Up @@ -74,7 +74,7 @@ public void onPause() {

@Override
public boolean onCreateOptionsMenu(Menu menu) {
new MenuInflater(this).inflate(R.menu.options, menu);
getMenuInflater().inflate(R.menu.options, menu);

return(super.onCreateOptionsMenu(menu));
}
Expand Down
3 changes: 2 additions & 1 deletion SystemServices/Settings/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES" exported="true"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@
import android.content.Intent;
import android.os.Bundle;
import android.provider.Settings;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.util.Log;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


public class SettingsSetter extends ListActivity {
private static Map<Integer,String> menuActivities=new HashMap<Integer,String>();
private static List<BooleanSetting> settings=new ArrayList<BooleanSetting>();
Expand Down Expand Up @@ -77,11 +77,11 @@ public void onCreate(Bundle savedInstanceState) {

@Override
public boolean onCreateOptionsMenu(Menu menu) {
new MenuInflater(getApplication())
.inflate(R.menu.option, menu);
getMenuInflater().inflate(R.menu.option, menu);

return(super.onCreateOptionsMenu(menu));
}


@Override
public boolean onOptionsItemSelected(MenuItem item) {
Expand Down

0 comments on commit 0cae8fd

Please sign in to comment.