please help me..
I want to display menus of one application in to another application.
I try these method but could not display other application menus.
Suppose I have two Application Sample1 and Sample2.
whenever I Focus my Sample2 EditTextArea it should automatically display Sample1 menus in Sample2.
My Coding is.
1.Sample1
Below code I used to Sample1.java
Using java Syntax Highlighting
- public boolean onCreateOptionsMenu(Menu menu){
- super.onCreateOptionsMenu(menu);
- menu.add(0, 0, "message1");
- menu.add(0, 1, "message2");
- menu.add(0, 2, "message3");
- menu.add(0, 3, "message4");
- return true;
- }
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
AndroidManifest.xml in Sample1 project
Using xml Syntax Highlighting
- <?xml version="1.0" encoding="utf-8"?>
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.google.android.Sample1">
- <application android:icon="@drawable/icon">
- <activity class=".Samplemenu">
- <intent-filter label="EditText">
- <action android:value="com.google.android.Sample1" />
- <type android:value="text/*" />
- <category android:value="android.intent.category.ALTERNATIVE" />
- <category android:value="android.intent.category.SELECTED_ALTERNATIVE" />
- </intent-filter>
- </activity >
- </application>
- </manifest>
Parsed in 0.003 seconds, using GeSHi 1.0.8.4
2.Sample2 project
Below code I used to Sample2.java
Using java Syntax Highlighting
- @Override public boolean
- onCreateOptionsMenu(Menu menu)
- {
- super.onCreateOptionsMenu(menu);
- menu.add(0, 0, "Menu1");
- menu.add(0, 1, "Menu2");
- menu.add(0, 2, "Menu3");
- Intent intent = new Intent(null, getIntent().getData());
- intent.addCategory(Intent.ALTERNATIVE_CATEGORY);
- menu.addIntentOptions(Menu.ALTERNATIVE,0,new ComponentName("Sample1","Sample2"),null,intent,0,null);
- return true;
- }
Parsed in 0.033 seconds, using GeSHi 1.0.8.4


