How can I implement the following input behaviour using EditText in Android. Is there a existing library to implement this behaviour or if else, what would the logic be like? This behaviour can be seen on ATM machines as well.
Here's a gif that demonstrates this behaviour in an Android app:
As observed, the input starts with the last digit and proceeds to the left while appending necessary commas and decimal separation (2 decimals). I couldn't find any library that implements this behaviour.
Can you point me in the right direction with an existing implementation or a library?
I resolved this and built a custom library based on Subhechhu Khanal's link to a resolved thread. Anyone who needs this behaviour can use the custom library and customise it as required.
ATM-EditText Library: https://github.com/dinukapj/ATM-EditText
I encourage the community to make this library better. Thanks!
Related
Does anyone know anything about useful time range picker libraries that are open source? For example, the app Twilight uses some custom slider view for picking time ranges that I find very appealing (see bottom):
Is this open-source or are there similarly functional pickers? I could not find anything useful in the docs or on Android Arsenal.
Alternatively, I might build it from scratch. I was just wondering if there is not anything around yet.
You can try this slider from Material Design library and implements for youself:
https://material.io/develop/android/components/sliders
ps. check the section: "Setting a LabelFormatter"
An open source solution using a pop-up-dialog : TimeRangePicker
I'm looking for something similar to the OS X / iOS NSOutlineView, basically a class which encapsulates something like a table which is also hierarchical and allows opening and closing of subordinate parts of the outline. So far I have been unsuccessful in my search, even on developer.android.com, which leads me to believe that maybe Android does not have such a thing. However, this seems hard to believe, given how ubiquitous outlines and hierarchical structures are. Am I missing something, or how is something like this generally done on the Android platform? How would one port code relying on such a construct to Android?
Hi Michael have a look on my implementation an android counterpart of the NSOutlineView based on the RecyclerViewAdapter.
https://github.com/willybaer/WDTreeList
Peace up
I'm trying to create an active reading application prototype for my course project in Android platform. I'm new to Android SDK, and I cannot figure out how to use WebView's native functions, because I need to use them to implement selecting / highlighting / copying texts using gestures. I saw that WebView has a function setSelection but it's private and I cannot use it.
But I think may be there is something that I miss. May be I need to use something else. Please, give me some suggestion, links, books where I can find useful information.
Can any one give some suggestions to implement captcha in android
A little bit of shameless self-promotion, but I recently had this same question, and after combing through StackOverflow.com realized that all of the solutions out there are Remote API based (which would require my simple app to require Internet permissions), and either were super difficult to implement on Android, or were limited by use based numbers and you could not get that number raised.
So I started a project, and put it on GitHub, Click here
Current features are limited, but I hope they will grow with the open-source community:
Simple Text Captcha, editable length.
Simple Math Captcha, editable math operators.
The biggest feature of all is ease of use!
Take a look to this project, they have a some android's examples
https://labs.ericsson.com/apis/captcha/downloads
https://labs.ericsson.com/apis/captcha/documentation
or maybe use this
http://simplecaptcha.sourceforge.net/
to get some ideas.
I want to use a control similar to Swing JSpinner in an Android application. I know that Android has a widget called Spinner, but it's more like a combo box than a JSpinner. I've noticed that DatePicker and TimePicker widgets are using components that are just like JSpinner. The only problem is that I don't really want Date or Time. I just want to get some integer, say from 1 to 50, that user chooses. Is this possible? I've searched Android API reference in and out, but I couldn't find any clue on how to do this. Any help or hint would be much appreciated.
Thanks,
Tomislav
Well, the functionality for the TimePicker is provided by a hidden internal class named NumberPicker, which would probably be exactly what you wanted if only the folks at Google had made it available.
You might want to go to the android source code and lookup the source to android.widget.NumberPicker in the frameworks/base repository. (The repository treats it as if it were a publicly available class, though I see no sign of it in the released dev jars.)
I stole the spinner from Astrid, which stole it from Android's source.
Take a gander here:
http://github.com/ralphleon/TeaTimer/tree/master/src/goo/TeaTimer/widget/
Though my app is GPL, the number picker code is under the permissive Apache license!