Custom Activity as InputType for EditText - android-edittext

I have an activity with custom code (calculator). I want to call it as input type when EditText is clicked on. Is there a way to replace existing input type with this activity and what would be the best way to do it?

The easiest way is to create custom keyboard and attach the desired functionality to it.

Related

Settings view with user text input

I'm new to iOS development and trying to figure out how these in-app settings views are done where you can change your contact details and a few other settings.
My first attempt was a static table but I couldn't figure out how to override the cell content with a text input field. Is this the way to go? If yes, what's the easiest way to add a text input field to the cell that I can preset with the user data (coming from our server)?
For a static TVC, set the cell type to custom and you can drag out labels and fields as you need.

Blackberry list field without canvas

Is it possible to create a customized list field in BB, where each row will have 4 different labels, and a bitmap field, without implementing the drawListRow method?
Since drawListRow uses canvas I want to avoid it. Because, I need to display a browser field in list row. Or is it possible to add label fields in list row?
You probably aren't going to be able to implement this the way you want - try putting more than one BrowserField on a screen at once and you'll soon run into multiple issues. I'd suggest creating a custom Field to act as a row instead, or try and get the desired look n feel using Field Managers.

Adding actions for selected text

Is it possible to add actions, like Highlight or sending a Tweet, to the popup that appears when you select some text from a UIWebView?
Edit: If not, is it possible to obtain the selected text through another way?
Inject it via javascript, then send the location or href to something like "myaction://handleIt" and get it on the shouldLoad.

CustomListField using VerticalFieldManager

My requirement is to create a customlistfieldmanager by extending verticalfeildmanager, I am not able to figureout how to do this?
I am not able to understand why my manager has asked me to use this method.
any sort of help is welcomed!
It's possible that he's asked you to do this because of the most limiting factor of a normal ListField: you're stuck with uniform heights.
What you'll need to do is have a parent container that is a scrolling VerticalFieldManager. Inside of that will be custom Managers that can handle the same functionality as the row would in a ListField. It needs to accept focus and fire off an event when it's clicked. You'll also need to keep track of what item number it is, so that when it's clicked it knows how to notify any listeners about which one was selected. Also, the parent VFM will need to be able to keep track of which "row" is currently selected -- in this case which one has focus.
Edit for comment
If you add a NullField into each of them it can accept focus but won't actually show up as anything. To determine if a "row" (the Manager) has focus, you can use getFieldWithFocus() on that Manager and the one that doesn't return null is the row that is selected. You will probably also have to do some custom painting to draw the selection highlight
You will have to dynamically add and remove custom elements from your CustomListFieldManager as you add and remove elements from a VerticalFieldManager.
Your manager asked that because he want you to learn how to handle custom object to understand how to use managers.

How can i implement an interface like BB Messenger?

How can i implement an interface like BB Messenger showing a tree with a list of complex field items that are shown only if the tree item expands.??
Use a ListField for the contents of the collapsible area (you control how each row is painted), and use some other focusable field for the header. Add both to a VerticalFieldManager. When you click on the header once, remove the ListField from the Manager. When you click on it again, add it back.
I think you are talking about tree view. for that you can try this.
Create a field to display a tree view

Resources