Android User Interface like NumberPicker but data from SQLIte - android

How could I make a user Interface like the one with NumberPicker but the data came from the SQLite. Is there a Layout for this?
Like this User Interface
What do they call this Interface?
I'd like to create a view data from SQLite. Some what like
Apple
Banana
*Cake*
Donut
Eclair
Don't recommend using DialogFragment. I wanna do like this
Scrollable List

Unfortunately there is no layout that does that out of the box, so you will have to do a lot of heavy lifting before getting things working. But the easiest way is to use NumberPicker and pass to it the values that you want to display as an array with setDisplayedValues. But you still have to create the connection to the database and query for the cursor that you will have to transform somehow to an ordered array, for which you can then map the values of the NumberPicker to the actual values in the database (told you, not easy...).
There is no easy way out of this, you could also try making your own component or buy one that does this for you.

This is what I've been looking for.
https://play.google.com/store/apps/details?id=antistatic.spinnerwheel.demo
Source code: https://github.com/ai212983/android-spinnerwheel

Related

preference for a list of words

I'm building an Android app whose settings include a blacklist, so the user can input a list of words. I took a look at the TextPreference but it doesn't really fit the scope since it's a dialog with little space.
Is there any preference (built-in or library) I can use for inserting a list of words? A bigger text area with no dialog should be enough. I didn't think that such a simple preference is not available.
Storing a blacklist of words is probably a little out of scope for SharedPreferences, since they are designed to maintain simple key:value pairs.
You should create a new Fragment that allows users to manage the blacklist and then implement your own data persistence. If you use Sqlite and create a clustered index on the column word, you will have O(log(n)) search. Opposed to O(n) search that scanning the csv values of shared preferences would yield.
There are no built-in preferences that provide behavior like that. Also no libraries that i know of.
I recommend creating a custom Preference for this. Internally the preference-v7 layouts setttings screen contains a RecyclerView. So you need to override some sort of ViewHolder logic (PreferenceViewHolder)
This could be usefull: http://www.hidroh.com/2015/11/30/building-custom-preferences-v7/

Adding Search Functionality To My Apps Android

I want to add search functionality into my apps, and also I did some research (http://developer.android.com/training/search/index.html) but I don't want to use database/sql. I want it to be something like this (http://www.androidhive.info/2012/09/android-adding-search-functionality-to-listview/) where you put all your search terms in a list of strings.
Question:
How do I implement the function where you click one of those search terms in listview, and the strings of the search term clicked will show up. Or is there any alternative way I can do this?
Comments are appreciated
Probably this might help you..see here
I think you should implement a new adapter rather than using ArrayAdapter. I don't know whether it is possible to do that using ArrayAdapter also.

Updating TextViews live as you type in Android

I'm trying to programme an Android app that will update some TextViews as I enter some values into some EditText views (live updating). I thought maybe using a while loop in some form might help but I wondered if there is a better way of doing it.
Yes, there is a beter way. Just use :
textMessage.addTextChangedListener(new TextWatcher(){...}
And use the onTextChanged(...) function from the textwatcher in order to modify the content of your label.

Android: Custom collation in SQLite

Is there a way of getting SQLite on Android to use a custom collation routine?
I'm aware of SQLite's C interface to do this, so I guess I could do it by writing C code for building with the NDK, but I'd really prefer a way to do it at a higher level.
I need to arrange things so that the text B-9 is sorted before B-29, for example. The default alphabetical sort gets them the wrong way round.
I am pretty sure that there is no way to do this in Android.
My suggestion would be to have a custom column used for ordering where you insert the value in a modified way that gets sorted as you wish.
In your case you could insert B-9 as B-09 or B-00....09 depending on the max value.

Android Grid View, Making a Word Search Game in android

I want to develop a Word Search game in android and the problem is how to create a layout
e.g http://apps.talkandroid.com/games/brain/631-com+dahl+brendan+wordsearch+view/
like this one and how to detect individual character in it. and read word from files and display in the view. need help
What exaclty is your problem? GridView would work fantastically and allows you to detects click real nice and easy and allows for easy content rewrites. Do you need help with how to do a gridview?
http://developer.android.com/resources/tutorials/views/hello-gridview.html
I might be late to the party, an easy solution to this problem: (A word puzzle Dictionary in 30 minutes crash course)
Download a dictionary
Convert the dictionary into an SQLite Db table
Prepare layout (Grid View, on touch listeners, cursor adapters)
Use a filter query provider on your GridView
Enjoy!

Categories

Resources