top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to use autocomplete for uri in android?

+1 vote
828 views

I'm using uri to read the contacts that are stored in mobile. Now I want display those names in autocomplete. Please explain me how to add uri in AutoCompleteTextView?

posted Nov 21, 2016 by Bhagyashree R

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button
Would you like to explain more about the problem.
I'm using ContactsContract.Contacts.CONTENT_URI to get the contacts of the mobile. And I want to use those contacts in AutoCompleteTextView.

To use autocomplete, first I need to store the content to be displayed with this option in an array of string and then I need to use it in arrayadapter.I'm not getting how to store those read contacts in arrayadapter.
I'm not getting how to store the read contacts in array adapter

1 Answer

+1 vote

AutoCompleteTextView is used exactly the same way as an EditText in your layouts (as it’s a subclass of EditText). You just need to replace your EditText by an AutoCompleteTextView and this part is done.To better understand check this useful link.

https://www.mindstick.com/Articles/788/android/autocomplete-textbox-in-android

https://developer.xamarin.com/recipes/android/controls/autocomplete_text_view/add_an_autocomplete_text_input/

I hope it will help you.

Thanks

answer Nov 22, 2016 by anonymous
Similar Questions
0 votes

I'm looking for native library for video play with custom buffering for rendering of big video files (500MB+) in android application. What is the best options?

+3 votes

We know there are bootstrap themes for free to use but don't know if there is same for android layouts so that we can reduce the time while designing the app UI. If someone know, please share the link?

+2 votes

Similar to HAL for enabling s/w apps development on variety of h/w platforms, can a generic OS abstraction Layer ( OAL) be developed such that the apps written on top be immediately supported on all underlying platform?

IOAL can expore two interfaces. The southbound will expose open APIs towards the underlying OS ( Android/IOS/WIndows/Blackberry) which can then invoke the native APIs on OS. More than APIs the other mechanism of dealing with underlying OS will be embedded in this interface.

The northbound interface will be the standard APIs towards the APPs. This will be uniform across platforms. The OAL will also manage abstracted resources inside as it may be required to manage the underlying OS.

There will be no h/w intelligence/awareness inside this layer. This may puncture the individual power of popular platforms which draw strength from number of apps on it.

+2 votes

I have added a floating action button in my layout but using backgroundtilt, it doesn't change the color of background.

Here my code segment

   <android.support.design.widget.FloatingActionButton
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/AddNewButton"
        android:background="@drawable/add"
        android:layout_margin="15dp"
        app:rippleColor="@android:color/white"
        app:fabSize="normal"
        android:clickable="true"
        app:layout_anchor="@+id/HeaderSection"
        app:layout_anchorGravity="bottom|right|end"/>
...