Android :: Remove Input Method From Android's TextView Context Menu?

Oct 28, 2010

I have a context menu on a TextView representing a user name in my app. When the context menu appears I want to have certain options such as "View Statistics" etc. The context menu is appearing fine and everything is working great except it's adding "Input method" to the context menu and I do not want it there. It's irrelevant to what the context menu is there for and there is not text entry. How can I remove this item from the context menu? I've tried removing item 0 in the context menu and adding android:editable="false" to the XML file to no avail.

Android :: remove input method from android's TextView context menu?


Android :: Context Menu Starts In On Create Method?

Sep 1, 2010

is it possible to start a context menu on the onCreate method? I know its probably bad design ethics but I have my resons! I've tried the: register For Context Menu (this.getCurrentFocus()); But its not working.. So does anyone have any better ideas?
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
LinearLayout layout = new LinearLayout(this);
layout.setLayoutParams(new
LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
//Button button = new Button(this);
//button.setLayoutParams(new
//LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
//button.setText("my button");
TextView text = new TextView(this);
text.setLayoutParams(new
LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
layout.addView(text);
setContentView(layout);
registerForContextMenu(text);
openContextMenu(layout);

View 1 Replies View Related

Android :: Possible To Communicate With Input Method Without Normal Textview Like Edittext?

Jun 23, 2010

If I popup input method with togglesoftinput,my view's onCreateInputConnection was not called, and i can not communicate with input method.

And then i try to attach the input method to my view...
but it returns false

How can I force onCreateInputConnection to be called?

or

How can I make mServedView == view ?

View 1 Replies View Related

Android :: Show Context Menu When Link Is Long Pressed In TextView?

Apr 18, 2010

I have a TextView with its MovementMethod set to LinkMovementMethod. Text added to the TextView is a combination of normal text and URLs. For URLs, I would like to offer a context menu when the URL is long pressed for doing things such as copying the address. I've had a look at the source for LinkMovementMethod but it doesn't seem to have any long pressed related code I could override. Any ideas on how to go around achieving this?

View 1 Replies View Related

Android :: Get Droid To Show IME In Input Method Pop-up Menu?

Aug 5, 2009

I have written my input method on lines of LatinIME. My IME "MyIME" has a service and an activity similar to LatinIME.

Installing it to emulator via eclipse does not seem to work and hence I have tried the following approaches.

MY GOAL: ~~~~~~~~ All I need as the first step to know that I am heading in the correct direction is that I should be able to see "My IME" as one of the available input methods. For example, on any EditText, when I "long click & release", the Input Method menu that pops up must also show "My IME" as one of the available input methods.

However so far the pop-up only shows "Android keyboard" (LatinIME). Hence I tried the following approaches.

Approach-1: =========== I checked out the andorid source code and built & ran it successfully to make sure I got the build process right. I created my project in ~/mydroid/packages/inputmethods/MyIME. It has the package structure 'com.android.inputmethod.myime' (to be in line with Android's package structure, I am not sure if this is required).

I ran a build using "make". Make succeed in compiling MyIME, just like LatinIME and all the android tools were also created. However looking at the build output, LatinIME was installed into /system/app/ LatinIME.apk while MyIME was not installed at all.

Question with respect to approach-1: ------------------------------------ 1. How to get the build process to install MyIME into /system/app as MyIME.apk?

Since install did not happen via the build process, I started the newly built emulator (and newly built ddms to watch logs) and used follownig install approaches:

Approach-2: =========== I ran 'ant debug' to get MyIMESettings-debug.apk. Then I ran 'adb install MyIMESettings-debug.apk'. The attempt failed with the message "Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]". Hence I tried the approach-3.

Question with respect to approach-2: ------------------------------------ 2. Why did the install fail when the project was built using 'ant debug'? Is it some thing to do with debug signature?

Approach-3: =========== The build process had created an APK file but hadn't installed it (/ mydroid/out/target/product/generic/obj/APPS/MyIME_intermediates/ package.apk) I renamed that package.apk to MyIME.apk and installed it using "adb install MyIME.apk". The install succeed. However, the adb install put my APK under /data/app with the name "com.android.inputmethod.myime.apk" instead with name MyIME.apk

Question with respect to approach-3: ------------------------------------ 3. Is there any way to get "adb install MyIME.apk" to install into / system/app folder?

Again, what I am trying to achieve is mentioned under "MY GOAL".

View 2 Replies View Related

Android :: Remove An Array Item From A Context Menu?

Aug 27, 2010

I have a ListView and would like to remove a row item when the user long clicks on selects Remove from the context menu.

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

How can I get a reference to the row number that was clicked, so I can remove that index from my array?

View 1 Replies View Related

Android :: Android - Remove The Popup Input Method?

Sep 15, 2010

I have an application with a WebView. The WebView opens a page and there is a input field on the page. If the users clicks on the input field and presses for long some of the submission buttons, a "input method" popup appears (from Android). How can I remove this popup? I tried override-ing the onTouch, onKeyLongPress and some other methods to return false, but it doesn't seem to work.

View 1 Replies View Related

Android :: Launch Context Menu From Context Menu

Jan 21, 2010

How can I launch a contextmenu from a contextmenu? I'm trying to replicate the MediaPlayer action that happens when you long click a song, then click "Add to playlist" in the resulting contextmenu. When you click that menu item, another contextmenu pops up with "Add to playlist" as the title, and "Current playlist", "New", and however-many-playlists-you-have defined after that.

View 4 Replies View Related

Android :: Input Field With Custom Input Method

Jan 6, 2010

I would like to show a custom input field (specifically, one containing only 9-0 and two extra buttons containing decimal separator (, or .) and a delete button). I could create a custom IME, but (as far as I know) that would have to be set by the user as the system-wide input method. Is there a way to implement an input method and bind it to a specific input field?

View 1 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 :: 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 :: Invoke Android Context Menu On Menu Item Press

Nov 9, 2010

Can anyone kindly guide as to how can I invoke a context menu on the press of a menu item. I googled a lot for the same, but nothing turned up. Look forward for your valuable help.

View 1 Replies View Related

Android :: Difference Between Context Menu And Option Menu In Android

Oct 25, 2009

the difference between context menu and option menu in android? When I click the menu button on the emulator, is that option menu? or context menu? And how to invoke the other menu (not trigger by the menu button)?

View 2 Replies View Related

Android :: Get An Application Context Into A Static Method

May 7, 2010

I'm working on an Android application that has several Activities. In it I have a class with several static methods. I would like to be able to call these methods from the different Activities. I'm using the static methods to load data from an xml file via a XmlResourceParser. To create a XmlResourceParser requires a call on the Application Context. So my question is, what is the best way to get a reference to the Application Context into the static methods? Have each Activity get it and pass it in? Store it somehow in a global variable?

View 2 Replies View Related

Android :: Method Undefined For Type SmsReciever - Context

Nov 13, 2010

I am developing an app that upon receiving an SMS message with a unique string of text, the GPS is enabled and starts tracking the location of the phone. The issue I'm having is with the getSystemService() method.
I receive the error "The method getSystemService(String) is undefined for the type SmsReceiver", I believe this is because it does not have a context. I have tried to add in a context with in my code with 'ctx', and that removes the error but my application crashes every time I run it on my phone. The code for recieving the SMS works fine, and the GPS location tracking code works fine if it's in my main class.
I still don't fully understand contexts.

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

View 1 Replies View Related

Android :: Regarding Context Menu

Nov 24, 2010

i have got a stupid question to ask. I created a custom ContextMenu. But when i call the menu, the menu displayed will also have the default menu added in. Is there anyway for the default ContextMenu not to appear as well?Code requested: @Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo)
super.onCreateContextMenu(menu, v, menuInfo);
MenuInflater inflater = getMenuInflater();
menu.setHeaderTitle("Recipients");
inflater.inflate(R.menu.menu_contacts, menu);

View 1 Replies View Related

Android :: Context Menu For Dialog

Jun 18, 2009

Hi! I use dialog with multipleChoiseItems. Is there any way to create context menu for list of the items?

View 2 Replies View Related

Android :: Check Box And Context Menu

Apr 20, 2010

I have a ListView with a ContextMenu, it has one CheckBox (the CheckBox has android:focusable="false") and one TextView per row, but you can hide the TextView in the preferences menu. After doing that, the CheckBox wasn't registering the ContextMenu, so of course, why not register For Context Menu(cb) and unregisterForContextMenu(getListView())? Yes, i did that, but then, when when i call the delete command of onContextItemSelected, the app crashs. AdapterContextMenuInfo info=(AdapterContextMenuInfo)item.getMenuInfo(); db.deletarTarefa(info.id);

View 1 Replies View Related

Android :: Progressdialog Over Context Menu

Mar 7, 2010

I have a context menu option that, when clicked, will load some information from the web and insert it into a database.So this is a lengthy process and I would like to display a progressdialog over the top of the context menu when this option is selected.I've got the progressdialog running now, but it won't show up.It's almost like the context menu is covering it.So is there a way that I could get the progressdialog to show up on top of the context menu and be visible to the user.

View 2 Replies View Related

Android :: Context Menu For Other Views

Nov 8, 2010

I have created one music app. In this app, i have loaded albums dynamically by using URL request and displayed as table layout. For each table row i registered context menu. But when the context menu is appeared by long press on each table row i could not find on which table row the context menu is appeared. If anyone know please guide me to solve this problem.

View 2 Replies View Related

Android :: Checkbox In Context Menu

Dec 10, 2009

I have a ListView with 5 items. Each of the items can be long pressed to open a Context Menu. The Menu has 5 options and I want them to be selectable, by having a check box. I know of the multiple choice listview but was not sure how to have this checkbox feature in a ContextMenu.Does anyone know if this is possible and if so, how?

View 4 Replies View Related

Android :: Add New Item In SMS Context Menu

Nov 12, 2010

Can I add a new item in SMS context menu which can in turn invoke my app/activity?

View 2 Replies View Related

Android :: Hide Context Menu

Jul 26, 2010

I have a context menu that starts to do some calculations when you press one of the context menu items.While the calculations are made I have a progressbar that I want to show. The progressbar is called from the calculations() method. The problem is that I can only see the context menu while the calculations are being made and the phone is more or less frozen.

View 3 Replies View Related

Android :: Context Menu Before Sending SMS

Feb 7, 2010

if google voice is installed on your phone, when you dial a phone number a context menu pops up asking if you want to dial with or without google voice. I would like to accomplish the same task for dialing a number or sending a text message. Does the API allow you to do that?It seems there is a process_outgoing_calls, in the permissions manifest, but is there anything for the SMS?

View 2 Replies View Related

Android :: ExpandableListView Context Menu

May 14, 2010

I'm trying to add a context menu to my ExpandableListView. I've implemented onCreateContextMenu() and onContextItemSelected() but if I hold my finger on a menu item context menu doesn't appear. What's my mistake?

View 1 Replies View Related

Android :: How Do I Get Text From A Context Menu

Aug 22, 2010

I have a ListActivity with a list of names (Jacob, Will, Matt, etc.). I have a contextMenu which gives the user the option to edit or delete the person. I know how to find the id to perform the edit and delete functionality, but I can't figure out how to get the person's name to be added to the intent extras or to add a toast when a delete occurs.

Here is a snippet of code that I'm using for the context menu: Code...

View 2 Replies View Related

Android :: Want To Set Up A Context Menu In An AlertDialog?

Nov 13, 2010

I've been working at this all day, and I'm really close but just can't get this to work. I have a button that pulls up an AlertDialog populated with saved entries that include Name and Price. Right now, I can click an item in the Dialog and have it automatically fill in the Name and Price fields in my activity. I want to also be able to long press an item and receive an option to delete it. This is my first try at an Android app, and a lot of this is repurposed from the Notepad Tutorial. Two things I can't figure out:

1) Is my registerForContextMenu sufficient/correct?
2) What am I doing wrong with my onCreateContextMenu? Code...

View 1 Replies View Related

Android :: Private Input Method

Apr 29, 2010

I create an input method that is private, not available to other applications on the phone?

View 4 Replies View Related

Android :: Sharing A Context Menu Between Activities

Jun 22, 2010

I have two activities that both contain an identical context menu built programmatically using menu.add(int, int, int, CharSequence). They both use onCreateContextMenu and onContextItemSelected.

The first Activity contains a ListView, when the user long presses on an item the context menu appears for that item. The second Activity (a detail screen for each item in Activity 1) contains a button, when the user presses the button the context menu appears.

I'd like to share the code that creates the context menu between these activities. The only thing these activities share is the context menu, so it seems like a bit of overkill to create a superclass (e.g., ActivityOne extends ContextMenuActivity) that defines onCreateContextMenu and onContextItemSelected methods.

Is there a better way of sharing these methods between activities?

View 2 Replies View Related

Android :: Context Menu Working In GLSurfaceView?

Sep 6, 2010

Having a little trouble working out how to have a context menu working in my GLSurfaceView view. There doesn't seem to be a "onCreateOptionsMenu" or "onOptionsItemSelected" to override. I do notice a "setOnCreateContextMenuListener" but I don't know how to use it.

View 5 Replies View Related







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