I am looking to create an application that allows the user of the app the ability to create their own text box. It would be on top of an image file that I currently load. Basically they would zoom in to a place on the image, then drag with their fingers the position of the needed text box, then the box would be able to accept text...
I cannot find anywhere how I would accomplish this task ??? any suggestions or help would be much appreciated!!!
thank you!!
I am assuming based on
"then the box would be able to accept text..."
that you mean the user will be able to type things in to it.
If that is correct then an EditText is what you are looking for. By default this View is not set up to let the user
"drag with their fingers the position of the needed text box"
In order to make that work you'd have to write your own OnTouchListener for this view that recognizes the finger motions and changes the size of the EditText accordingly.
Related
I want to make an option like google translate have, when a user copies a text from anywhere in the mobile, a floating button comes for 5 seconds. When the user clicks on that floating button, the copied text is translated into a small window.
Like this
So my question is, how to make above floating button when user copy text from anywhere in mobile?
Please help me to make that...
It is possible by clipboard manager of android but tell me all process please...
I was looking for solution, how can I add a field on screen, after tap by finger? Where user can dynamically add any kind of text, which will stay on screen.
I was looking for any examples but I failed.
Thanks
add MotionEventListener to a view-> get coordinates where on screen a tap accured --> add an editText at thoes coordinates and change it to textView when done editig the text (You can use ViewSwitcher for that)
I'm building am app that will allow Odometer entry. I would like to use the image shown below as the background on an EditText. Doing that is no problem, however I can not seem to get the digits entered into the text view to line up in the spaces of the image. I've tried adjusted the text size, font face, etc.
Here is the image I would like to use...
Does anyone have any suggestions on how I can accomplish this? So that when the user entered digits into the EditText, each digit goes into the correct "slot"?
thank you!!!
You can use android:letterSpacing? (only applies api 21 and over)
Set up 6 separate EditTexts on top of that image each with dimensions of the square they need to go into. Then set up event handlers so that it appears to be one fluid motion across EditTexts when the user enters data. Not very elegant but it'll work.
I wan't to create a map view like in ACL2011 app.
here I list it's details and my progress.
It has several location tags and those containing deferent icons - I can't do it(I can set one tag for all the places but can't put different tags.
it has drop a pin(drop a pin to a specific location - I can do this.
the dropped pin can move( long press on it allow user to move the pin) - cant do it
one user tap on the dropped pin it shows a label with two buttons - can't do this
Please help me...
I tried a lot but I still can't do it. found one with moving pin but I did't able to apply other functions to that.
thanks in advance.
Try this project
Pretty new to android so excuse me if this is a really obvious question.
Say my application has a bunch of TextViews, each one showing the attributes of a certain product (name, price, etc). I have a button next to each of these TextViews labeled "modify".
How do I make it so that when I press the modify button next to a certain attribute, a popup window with a space to enter text into comes up so that the user can enter text into this box and then have the actual attribute listing on the original page change? Actually I just need a push in the right direction with creating this popup text field... not sure if there is already some built in functionality for this or if not, what would be the best way to create this kind of thing.
Thanks.
Why not have the modify button set TextEdit.setEnabled(true); and then change focus with TextEdit.setFocus? Note that both of these are inherited from view
If you really want a dialog you might want to looking into the AlertDialog.Builder. I know you can use it with buttons and radio buttons, but I'm not sure you can get it to work with a TextView.
Use a code like this for the input popup: Android dialog input text
In the positive button handler, set your edittext content programmatically like this:
myEditText.setText(value).
As simple as that. The only difference with a standard GUI framework is that you don't retrieve the value as a result of the popup function. Instead, you must provide an action handler.