Android :: Exclude Activity From Recents Menu By Code
Aug 5, 2009
I need to exclude an activity from appearing in recent launched menu, but i am not able of adding android:excludeFromRecents="true" in AndroidManifest.xml, I have to do it in runtime. Does anyone knows if there is possible to set FLAG_EXCLUDE_FROM_RECENTS to the activity?
View 1 Replies
Aug 5, 2009
I need to exclude an activity from appearing in recent launched menu, but i am not able of adding android:excludeFromRecents="true" in AndroidManifest.xml, I have to do it in runtime. Does anyone knows if there is possible to set FLAG_EXCLUDE_FROM_RECENTS to the activity?
View 2 Replies
View Related
Oct 31, 2010
The app has an intent filter to allow it to appear in the share menu in other applications via ACTION_SEND intents. The app itself also has a share menu using ACTION_SEND and create Chooser(), and my app appears in the list. Since they are already in my app it seems strange to have them be able to share back to itself. Is there a way for my app not to appear in the list if it's being called from my app?
View 1 Replies
View Related
Oct 17, 2010
My app works with pictures. It can take multiple pictures as an input, process them, and send them again to another app.
As a consequence, my main Activity has declared an intent filter on ACTION_SEND_MULTIPLE for image/* mimetypes and can result in issuing a new Intent with the same action and data type using Activity.startActivity(Intent).
Is there a way to exclude my own activity from the list of apps that is displayed to the user after the startActivity() call ?
View 1 Replies
View Related
Aug 18, 2010
I need to enable a MenuItem when a previous screen (Activity) returns. I tried this code:
...
((MenuItem)findViewById(R.id.menu_how)).setEnabled(true);
...
but a null pointer exception is launched. BTW, the menu_how is set to false in xml; and the code is part of onActivityResult(int requestCode, int resultCode, Intent data) call.
View 1 Replies
View Related
Oct 15, 2010
I'm getting all kinds of errors when using res/menu/menu_home.xml, and my project won't build. That's when I remembered that there was a way to create menus from java code instead of declaring it via xml. Does someone remember how to do that?
View 1 Replies
View Related
Sep 12, 2010
This might be a simple question, but I've been looking around and can't find the answer,
well, as my title said, is there any code to show the context menu on the android from a code, instead press the menu button? eg. when i touch the screen then it'll call the context menu?
View 1 Replies
View Related
Jun 13, 2009
I see this example of MenuCallback code, but i don't understand where is the reference 'ImageManager.IImage image' comes from? How is that image get created and passed it to MemuCallback?
View 2 Replies
View Related
Aug 1, 2009
I must to new a thread. I know how to implement this issue by Menuifest.xml, see also: http://groups.google.com/group/android-developers/browse_thread/threa...
But my question is how to add share menu of Gallery by java code not Menuifest.xml. My code is as below:
code:.........
But registerReceiver always return null, and there is no menu added to Gallery's Share.
View 4 Replies
View Related
Aug 1, 2009
I know how to implement this issue by Menuifest.xml, see also:
Google Android Developer Group related issue
But my question is how to add share menu of Gallery by java code not Menuifest.xml.
My code is as below:
CODE:........
But registerReceiver always return null, and there is no menu added to Gallery's Share.
View 1 Replies
View Related
Aug 31, 2010
Sharing an Options Menu between Activity and Map Activity. Is this possible? I have an Options Menu shared between multiple Activities but now I need that menu in a Map Activity.
View 1 Replies
View Related
Oct 8, 2009
I am writing an activity where the user is supposed to some editing and is critical. In this activity, I dont want pressing of Call key to make it go to Call Log so I handle onKeyDown call back and there if the key pressed is Call, I just return true. That solves my problem. But, if Options menu is opened and then I press Call button, I am not getting control in onKeyDown.
View 8 Replies
View Related
Nov 10, 2009
Can Activity "A" open the options menu of a view in Activity "B"? In this case I am building Activity A but Activity B can be any other running activity. I think this is an impossible security violation but I really want someone to prove me wrong.
View 2 Replies
View Related
Jun 22, 2009
i have dialog style activity android:theme="@android:style/Theme.Dialog"The menu appears about 50 px from the bottom of this dialog. So if activity screen is too small - it right in the middle of the screen. Is there any way to anchor menu to the bottom of the screen?
View 5 Replies
View Related
Nov 12, 2010
I'm attempting to call start Activity(myIntent) from the click of a menu button but my application crashes at that point. The same start Activity call works fine from a regular button click, so, I assume the menu button is missing information about the context? Or maybe I'm totally off the mark here. So what's the correct way to have a menu item take me to a specific Activity? I've revised my code based on the initial set of advice. Still crashing in the same place. The debugger doesn't enter the exception clause, the app just dies. Code...
View 2 Replies
View Related
Jan 20, 2009
Does someone know how to display images in an activity's context menu? I've tried setIcon(resId) and it doesn't work (although it does work in the Options Menu).
View 2 Replies
View Related
Aug 9, 2010
I have a need to capture some user input when an activity opens for the first time. I'm hoping to give the user a list of options to select from, which will be pulled in dynamically. I'll then store the selected value locally for future use. I'm not finding a way to do what I'm after and was wondering if anyone has run into this before and how they solved it.
Fantasy Football<http://chriswstewart.com/android-applications/fantasy-football/>- Android app for fantasy football fanatics and MFL owners Social Updater<http://chriswstewart.com/android-applications/social-updater/>- An easy way to send your status blast to multiple social networks
View 9 Replies
View Related
Feb 28, 2010
I am trying to start a new activity from a menu action, as follows:
CODE:.............
The class exists, and has the OnCreate method over-ridden, but whenever I try to perform the action in the simulator I get an ActivityNotFoundException raised. I have looked through the documents and as far as I can read, I do not need to create an Intent in the manifest.xml for this to work.
View 3 Replies
View Related
Dec 16, 2009
In android, I create my menu item like this?
public boolean onCreateOptionsMenu(Menu menu) {
menu.add(0, 0, 0, "Menu1");
menu.add(0, 1, 0, "Menu2");
return true;}
How can I set all the menu item disabled programmically (in another part of the code in my activity, not in onCreateOptionsMenu() method itself)?
View 2 Replies
View Related
Jan 15, 2010
I wanted to create a static options menu for all my activity screens. I dont want to override onCreateOptionsMenu() in each activity. Since Menu class is an interface with a huge number of methods, its difficult to create a static object of the implementing class.
View 3 Replies
View Related
Jan 13, 2010
I'm trying from main Activity (MainFile.java) to open a Map as a new intent through a menu. Something like this...
CODE:..............
And I already have set up thing on my manifest.xml with access to...
CODE:........
It worked fine with other File.class, but with the Map.class doesn't seem to be working.
View 1 Replies
View Related
Oct 7, 2010
I want to use addIntentOptions to drive my menus when ever possible. This seems the cleanest way to provide them. Rather than explicitly detailing activities, simply ask for a menu listing all the activities which are available for my data item.So I'm trying to put together a context menu for a List View. It works great. Only problem is that I have an activity that has two intents that consume my data type, and only the first shows up.The activity in question in Android Manifest.xml
<activity android:name=".ui.MyActivity" android:label="The title">
<intent-filter android:label="First context label">
<action android:name="com.sample.action.FIRST_ACTION" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.ALTERNATIVE" />
<category android:name="android.intent.category.SELECTED_ALTERNATIVE" />
<data android:scheme="myscheme" />
</intent-filter>
<intent-filter android:label="Second context label">
<action android:name="com.sample.action.SECOND_ACTION" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.ALTERNATIVE" />
<category android:name="android.intent.category.SELECTED_ALTERNATIVE" />
<data android:scheme="myscheme" />
</intent-filter>
</activity>
View 1 Replies
View Related
Aug 3, 2010
Please find the code sample below:
public class Abc extends Activity implements OnClickListener{
private ListView displayList;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mainlayout);
displayList =(ListView)findViewById(R.id.addressbooklistview);
addressbookAdapter = new CustomListAdapter(this,addressbookList);
displayList.setAdapter(addressbookAdapter);
registerForContextMenu(displayList);}
I am not able to invoke the context menu on long press. Please let me know any solution for the same.
View 2 Replies
View Related
Dec 9, 2009
I am completely exhausted to think logically right now..... I am sure it is pretty easy to implement
I have a menu item which when selected would call another activity class. I am using switch case to select between menu items. I tried creating an Intent to start activity using the Class name but doesn't work.
View 3 Replies
View Related
Jun 2, 2009
I want to start the activity owned by other application. I know we could construct the Intent(setAction,setClass), and then call context.startActivity(intent) to start a new activity owned by the same application. When we start the activity not owned by the same application,doest this also work?
For example, I have a activity (com.test.StartTest) and there is a button that used to start some activity Settings owned by the Phone:
CODE:..............
View 3 Replies
View Related
Oct 18, 2010
I have list activity with custom array adapter and I can't to get context menu when make long press on list item.
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp">
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
Why I do not see context menu? What I do wrong? How to get context menu with array adapter and ListActivity.
View 1 Replies
View Related
Jun 2, 2010
I'm developing an app that starts with a main menu, and then continues through three different steps (activities) to a final activity where the task is marked complete. On this last activity, i have several additional options (add note, share, etc..) and i also have a return to main menu button.
My question is.. how do i stack the activities so that calling finish() on the final activity will return back to the first activity launched? i am currently just starting the new activity via an intent, so pressing back on this screen doesn't return me to home as i would like.
View 2 Replies
View Related
Sep 20, 2009
I'm writing program for Android (SDK 1.5). I would like to know how to add/register one of my program activities in "Home Screen -> Menu -> Add-> Shortcuts" (or on Hero "Home Screen -> Menu -> Add to Home-> Shortcut") so that user will be able to add it to his home screen. Is there an Intent Filter or any other way to achieve that?
View 2 Replies
View Related
Jan 5, 2010
I know that Android provides some useful methods to be overridden in order to define a menu:
CODE:..............................
I would like to have this menu shared by each Activity and ListActivity of my Android application. This is for having a standard menu in each (List) Activity that lets the user jump to every part of the application within a click.
Right now, the easiest way to achieve this is to copy-and-paste both methods in every (List) Activity of the application. I don't like this redundancy of code written.
Is sub-classing a reasonable choice? I've already seen that sub-classing one of my ListActivity does not work very well (threads that retrieve objects from a database are giving problems). Are there other ways to share a menu though Activities?
View 2 Replies
View Related
Sep 25, 2009
android:enabled can be set at AndroidManifest.xml <activity android:name="MyActivity" android:enabled="true">
How can I set the attr true or false in my programm?
View 3 Replies
View Related