samedi 25 avril 2015

AutoCompleteTextView's Adapter Wrap whole screen


I want AutoCompleteTextView adapter upper to specific layout as in image below

enter image description here

<RelativeLayout xmlns:android="http://ift.tt/nIICcg"
    xmlns:tools="http://ift.tt/LrGmb4"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/background"
    android:clipChildren="false"
    tools:context=".HandleAllActivity" >

    <android.support.v4.widget.DrawerLayout
        android:id="@+id/drawer_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/background"
        android:clipChildren="false" >

        <!-- Framelayout to display Fragments -->

        <FrameLayout
            android:id="@+id/frame_container"
            android:layout_width="match_parent"
            android:layout_height="match_parent" >
        </FrameLayout>

        <!-- Listview to display slider menu -->

        <include
            android:id="@+id/drawer_star_side_ref"
            android:layout_width="150dp"
            android:layout_height="match_parent"
            android:layout_gravity="start"
            layout="@layout/drawer_start_side" />

        <include
            android:id="@+id/drawer_end_side_ref"
            android:layout_width="200dp"
            android:layout_height="match_parent"
            android:layout_gravity="end"
            layout="@layout/drawer_end_side" />
    </android.support.v4.widget.DrawerLayout>

</RelativeLayout>

Code of ActionBar is

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://ift.tt/nIICcg"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@drawable/background"
    android:gravity="center" >

    <ImageView
        android:id="@+id/toggleButton1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:onClick="drawerOpenOrClose"
        android:src="@drawable/drawer_selector"
        android:tag="left" />

    <ImageView
        android:id="@+id/toggleButton2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true"
        android:onClick="drawerOpenOrClose"
        android:src="@drawable/drawer_selector"
        android:tag="right" />

    <AutoCompleteTextView
        android:id="@+id/autoCompleteTextView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/toggleButton1"
        android:layout_alignParentTop="true"
        android:layout_toLeftOf="@+id/toggleButton2"
        android:layout_toRightOf="@+id/toggleButton1"
        android:background="@drawable/ractangle_shape"

        android:singleLine="true" >
    </AutoCompleteTextView>

</RelativeLayout>

values of adapter is loaded from database


Aucun commentaire:

Enregistrer un commentaire