Android :: Add Menu Icon Programatically

Aug 6, 2009

In menu.xml you can specify an icon:

CODE:.................

Whereas in code you create entries thus:

CODE:........

How in the code version do you specify the icon please?

Android :: Add menu icon programatically


Android :: How To Access An Activites Menu Programatically

Aug 18, 2009

I'm writing unit tests in a class derived from ActivityInstrumentationTestCase2. I know I can access anything defined in the applications XML using findViewById(), but this application defines its Menu programmatically. I'm trying to access that menu so I can fire click() events to it in my tests the same way I'm doing with Button Views etc.

To illustrate, this works fine and shows I can control/test various Views:

CODE:...................

View 3 Replies View Related

Android :: Display Menu Programatically Without User Having To Press Its Key?

Feb 2, 2009

Is there a way to programmatically display the menu, w/o the user having to press the Menu key?

View 2 Replies View Related

Android :: How Do I Programatically And Permenantly Remove An Icon From Launcher?

Jun 17, 2009

I was looking through the source code for launcher in git for the first time after asking this question. I got the UNINSTALL_SHORTCUT to work. However, this seems to remove it from the home screen.Maybe my vocabulary is not correct, but I assumed the "home" screen was the thing that displays widgets and shortcuts that you can fling left and right to see all 3 screens.set in the AndroidManifest.xml.What I need to do is remove the icon from the "launcher" not just removing a shortcut from the home screen.I don't know if I can programatically over-write what I have set in the Manifest. That is, I need it to initially be displayed in the "Launcher" but upon receiving a certain intent, to hide itself.In essence, to programatically remove the "android.intent.category.LAUNCHER" from it's category list set in the AndroidManifest.xml

View 6 Replies View Related

Android :: Can't See STK Icon In Main Menu?

Aug 30, 2009

All Do anybody know how to make the STK icon available in main menu. Now, I can't see the STK icon in main menu, even though the RIL has sent the message "RIL_UNSOL_STK_PROACTIVE_COMMAND" about SET UP MENU to upper App layer. And RIL also receive correct terminal response (RIL_ REQUEST _STK_SEND_TERMINAL_RESPONSE) from upper App layer.

View 2 Replies View Related

Android :: Adding Icon To Context Menu

Feb 10, 2009

While Contextmenu items support calling setIcon : menu.add(0,).setIcon( R.drawable.xxx); the icon never gets displayed. Is this a bug? a feature? Is there a reasonably priced workaround for getting icons onto context menus?

View 2 Replies View Related

Android :: Customizing More Menu Button Icon

Jul 27, 2010

I was wondering if it is possible to customize the icon used for the More menu option (displayed when there are more than 6 menu options)? With the stock vanilla Android UI it appears as a disclosure-type arrow and on HTC Sense UI it's an ellipsis icon. Curious if these are fixed icons only defined in the Android resources or if there is a way to programmatically set them?

View 1 Replies View Related

Android :: Refresh Menu Icon Image

Sep 19, 2010

refresh menu icon image, where can i get it it's not here

View 4 Replies View Related

Android :: Writing Text On Icon Of Menu?

Apr 10, 2010

Can we set Title for a Menu Item in Android if it has an icon from drawable? I have a icon for a Menu Item and if I set the icon then the title that is set for that Menu item is not visible. Is this possible or not?

View 7 Replies View Related

Android :: Want To Add Context Menu Icon In Phone

Aug 7, 2009

I have a Listview with a ContextMenu, but when I setIcon for ContextMenu look like it doesn't work

public void onCreateContextMenu(ContextMenu menu , View v, ContextMenuInfo menuInfo){ super.onCreateContextMenu(menu, v, menuInfo); menu.add(0, DELETE_ID, 0, R.string.context_menu_favorite) .setIcon(android.R.drawable.btn_star);}

View 3 Replies View Related

General :: Android 4.4 - Hiding Menu Icon?

Jan 19, 2014

I want to hide the menu icon (the 3 cubes). I'm using a SGS+ and it has physical keys so I don't need the button on the screen. I use CM11.

View 1 Replies View Related

Android :: How To Create Menu Item Using Setting Icon?

Jun 8, 2010

Can you please tell me how can I create an android menu item using android setting icon?

View 1 Replies View Related

Android : Way To Hide Application's Icon From Main Menu?

Jun 24, 2010

I want to hide my application icon from main menu at the run time. I believe that a filter with category Launcher in the application's manifest file is responsible for the application's presence in the main menu. Is there any way to change the category at run time? or any other way to hide the icon from main menu?

View 4 Replies View Related

Android :: How To Put Action To Open Applications On Grid Icon Menu?

Jul 23, 2010

I have designed a main menu in android, but now I have no idea how to open that application when I click some specific icon for that application.

View 1 Replies View Related

General :: Freeze App Without Removing Icon From Menu?

Mar 5, 2014

it is possible to freeze an app without remove the icon from menu? all apps I tested just remove the frozem app icon.

View 1 Replies View Related

General :: How To Modify Icon Order (flyout Menu From The Top)

May 27, 2014

I want to change icon order. Is it possible? How can I do it?

look ScreenShot:

My phone: Samsung Galaxy Trend, GT-S7560:

View 3 Replies View Related

Samsung Fascinate :: Add To Shortcut Menu For Custom Icon Replacement?

Nov 6, 2010

I am trying to customize my dock so I removed all the stock dock icons by choosing the "blank" shortcut. Now when I add a custom icon it won't perform the function because I designated it blank. How do I add the actual function along with the custom icon?

View 1 Replies View Related

Sony Ericsson Xperia X10 : Can't Figure Out Notification Icon On Top Left Menu

Nov 30, 2010

I've just bought the Xperia Mini - and I know this sounds stupid - but I have a Notification Icon on the top left menu that I can't figure out what is. (It's not listed in the online user manual.) Can anyone help me out on what it is?

View 6 Replies View Related

Android :: Android - Can't Find Launcher Icon In Menu When Exit Application

Oct 31, 2010

I use a file browser to locate the APK, it installs successful and I can run it OK (when clicking "run" after install completes) However, if I then exit the application, I'm unable to see a launcher for it on my apps menu (where I would expect it, like other apps I've created) At the moment, every time I want to run the app, I first have to re-install it so I can access it, surely there must be a better way?

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jameselsey"
android:versionCode="1"
android:versionName="1.0"
>
<application android:icon="@drawable/globe" android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar">..................

View 1 Replies View Related

Android :: Custom Option Menu To Arrange Four Menu Items At The One Line?

Apr 30, 2010

standard four option menus displays 2 by 2. but i want to know that How to arrange 4 by 1. I just want to custom option menu like that. You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscribe@googlegroups.com For more options

View 2 Replies View Related

Android :: Contributing Menu Item To The Contact List Context Menu

May 23, 2010

I want a user to be able to long press a contact and be offered a menu item of my own that can run an activity of my own. You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscribe@googlegroups.com For more options

View 3 Replies View Related

Android :: How To Custom Option Menu To Arrange Three Menu Items

Apr 28, 2010

I want custom option menu to arrange three menu items where 2 menu items are displayed at the top and the third below it. Just as the following layout...........

View 12 Replies View Related

Android :: Adding Menu Items In WebView Context Menu

Mar 8, 2010

I'm trying to add custom menu items in a WebView Context Menu. Unfortunately, my items are shown in the menu of the first web page I load , but then if I load a second page, a long press only shows the standard context menu items. Mine are gone. I've put a Toast inside the code and it is displayed as well on the first loaded page, but not on the second. I'm using the code below:..............

View 6 Replies View Related

Android :: Adding Menu Item To Any Text Box Menu

Sep 10, 2010

Is it possible to add a custom menu item to the long-press menu that opens in any text box?

View 3 Replies View Related

Android :: Android - Keeping Options Menu Open After User Clicks On Menu Item

Nov 19, 2010

I have an Options menu up and running in my Android application and I've overridden the onCreateOptionsMenu, onOptionsItemSelected and onPrepareOptionsMenu methods to customize the menu a little. My question is related to keeping the Options menu open after the user clicks on a menu item. Basically, I'd like to be able to hide the menu until the user clicks on the device menu key. Once the user clicks on this key, I'd like to be able to hold the menu in place regardless of how many times the user clicks on menu items. If the user wants to hide the Options menu, they'd just need to click on the device menu key again. Is this type of interaction supported (or even advisable).

View 1 Replies View Related

Android :: Update An Apk Over Air Programatically?

Jan 20, 2010

I have an application I wrote for Android (lat's call it MyMainApp).

My contractor wants me to write another utility (service) to periodically check his website for newer versions of MyMainApp, and if there is one - download it and install.

I know this is handled by the Market app, but my contractor wants to do it in his own utility (he does not want the user to be bothered with the update process).

Of course - the user will be notified and agree to this feature. Can this be done?

View 2 Replies View Related

Android :: How Do You Switch Activity Programatically?

Aug 28, 2010

It seems like every example I can find of switching between Activity's involves creating an Intent and passing in the context of a View via an OnClickListener associated with a button.But what if you just decide you need to switch Activity's? In my case, a Preference value is causing an Activity switch. How do you create an Intent that can cause an Activity switch without an associated OnClickListener?

View 4 Replies View Related

Android :: Possible To Clear Notification Programatically?

Apr 19, 2010

Is it possible to clear a notification programatically?I tried it with the NotificationManager but its not working.Is there any other way i can do it?

View 2 Replies View Related

Android :: How To Scroll Programatically ScrollView ?

Jan 8, 2010

I have a little problem with a ScrollView.I have a layout for an activity which is made with a ScrollView. This scrollview contains two ListViews.<?xml version="1.0" encoding="utf-8"?>
<ListView android:id="@+id/accountsListView"
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:scrollbars="none" />
<ListView android:id="@+id/cardsListView"
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:scrollbars="none" />
</LinearLayout>In onCreate method of my activity I compute ListViews height according there contents.During execution, on activity launch, ScrollView is already scrolled a bit.So I tried, at the end of onCreate to call method scrollTo(0, 0), but it does not change anything.

View 1 Replies View Related

Android :: How To Set The Wall Paper Programatically

Jul 10, 2009

I have To set Wall Paper In application by writing the code programmatically. when i press the Grid view Image will get full screen ..... that image i should keep as a wall paper in the android mobile screen how can i do that in programatically. I have done some thing like this ....is it correct or any other way to do it.

CODE:...............

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved