Contact View Styling on Android - android

Ok, currently I have a view in my android app that displays a list of contacts for our agents that is retrieved via a web service.
I have built a simple array adapter that binds my contact objects to the listactivity and just uses a contactrow.xml template to display anywhere from 1 to 1000 contacts.
This works fine but is lacking at best. I want to replicate the way that contacts are scrolled in the android contact app. Is there is way to have the ABC's indexed to the right and help the end user navigate this contact list the same way they would expect?
Does the CursorAdapter help accomplish this? What is the best approach?

What you're looking for is the AlphabetIndexer class. I've not used it personally, but here is a tutorial that may help you:
http://www.anddev.org/tutusing_alphabetindexer_for_fastscrolling_listview-t10282.html

Related

Advice on using SearchView, ListView, an API, Adapters and SQLite together

I was wondering if there is a better way of going about things than the way I am doing it now, any help would be greatly appreciated.
Currently, I am working on a Search Fragment for my app, the idea being that they search (it shows their previous searches whilst they type), then they press enter or click one of their previous searches and results from their search are returned from the API (displaying a list of valid users in the listview) to which the user can then click on the one they want to access.
In total,
Search - > API -> JSONAdapter -> DB/Objects -> Display to User via ListView -> On click in ListView display New Fragment or an overlay.
Currently, I was a bit confused on how to implement it, I made a JSONAdapter that works for the API and submitting the SearchView returns the correct response from the API (However it is not displayed in the ListView). I also have a ListViewAdapter that works with a hardcoded list but doesn't seem to work using the JSONAdapter.
I also made a lot of classes to store the data from the JSONAdapter, I'm not sure if I should be using SQLite to store the values they select after searching (I think I probably should).
I'm sorry this question is such a mess, I'm just a bit lost at the moment.
I can clarify any confusions.
In Summary (TL;DR): Should I just be using the default google suggestions provider for history, should I even be thinking about SQLite or will the API be fast enough, can I use the same listview for previous history & search results?
Thank You.
I think there's no need to store data in Sqlite db, about th list view I think it is better if you used a RecycleView.

Android Searchable dictionary

I'm relatively new to Android and I'm working on my first application,A dictionary.Till now, I'm able to display the list of words and provide for a mechanism to add words in a bookmarks list but I'm not able to figure out how to add the search functionality using fts3 in Sqlite.What I require is to provide suggestions when the user searches for a particular word in the application. Can someone tell me how to proceed??
AutoCompleteTextView will help you.

Android: Which adapterview and adapter to show a dynamic list of apps

For my thesis I'm trying to do a kind of market similar to the Android market. I did the db in mysql, now I'm thinking about the android client interface. I'm a beginner so i need your help.
I will have on my db a lot of app, I need to do a native app that call the db (there will be php in the middle) and show the list of the app as in the android market, so with a title, a icon, a rating and a cost. All this info are on the mysql db and I think that php will get me back to my phone a xml file with all the info I need.
This is what I suppose, but if for you should be different let me know. For example if the local SQLite should play a role in this (it will definitely have one to share metadata for apps I downloaded)
I read that for dynamic list of stuff it's better to use an adapterview that takes the elements of the list from an adapter, that is a kind of bridge with the datasource. But for example arrayadapter is based on textview only, other on imageviews only and so on...... instead my views are not so simple but are something complex with some images, some textviews, rating and so on.......
So I need to find the right adapterview and the right adapter.
Now for my purpose, for you:
Which adapterview should I use? I was thinking to use listview.
And the harder one, which adapter? Do I need to create a custom one extending the base adapter class or there are some adapters suitable for my purpose?
If textview is the base widget for arrayadapter, which one will be the base for mine? A complex widget so basically a viewgroup?
I read something about cursoradapter, but I don't know what is it and if it's what I'm looking for. If you know what google use for it's market, that would be useful :)
Explanations, examples or links are welcome
Sounds like a custom ListAdapter is what you're looking for. Here's a decent introduction.
you should take a look at aptoide and how it's build Hope it helped
http://www.aptoide.com

Lazy loading from SQLite

I have some 4500 entries in my database. What is the best way to show them in a ListView. Should I load them all in one stretch when the application initializes or should I use lazy loading? The list will also be searchable and filterable. Could you also point me to some nice articles that would gimme a better idea. Please do give me suggestions.
I would like to point you to here first but I also have some experience I would like to share.
First, showing anything more than say 500 items in a list is probably going to cause users to complain (maybe not though). Users can get overwhelmed with info and it gets annoying for users to scroll to see all of the data (even with filters because some users will refuse to use them if they can scroll).
Second, the data adapter in Android is pretty smart so an adapter over thousands of items will be handled smoothly due to the way Android caches views and iterates through a result set with a cursor which is the subject of that link I pointed you to at the start of my answer.

Android equivalent to Windows Mobile Datagrid control?

I everyone. I'm very new to Android development and I want to develop an application that uses a local database. I want to show the results of queries in a DataGrid like object.
The UI would be somewhat similar to this.
Is it possible to develop this kind of UI in Android? If so how can I accomplish this? Are there good tutorials I can follow?
Thank you very much.
Marco Sousa
ListView is probably what you want. You have complete control over the presentation of each row through the ListAdapter that your app supplies, which you can use to present each row's data as a series of fixed width columns. Helpers such as CursorAdapter will give you a starting point for presenting data from a local database.
There is nothing strictly identical to a DataGrid. There is GridView, which gives you rows and columns, but that's designed more as a two-dimensional ListView. There is TableLayout, which gives you rows and columns, but it is not designed to handle an arbitrary number of rows.
There's a quite nice overview of available views including screen-shots and code examples in the tutorial section on the android developers site - this might help you in choosing the right layout:
Hello Views

Categories

Resources