1

In my application I am using Adapter. I struck at here . Actually I required to display xml/filename.xml into as below.

I want to display like below code.

I already done this manually but is there any method like we call layout. xml >layout> filename.xml and it display

how to do coding like this into xml file into the res/xml/..?

<cursor-adapter xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res/com.example.android.xmladapters"
      app:uri="content://com.android.contacts/contacts"
      app:selection="has_phone_number=1"
      app:layout="@layout/contact_item">

      <bind app:from="display_name" app:to="@id/name" app:as="string" />
      <bind app:from="starred" app:to="@id/star" app:as="drawable">
            <map app:fromValue="0" app:toValue="@android:drawable/star_big_off" />
            <map app:fromValue="1" app:toValue="@android:drawable/star_big_on" />
      </bind>
      <bind app:from="_id" app:to="@id/name" app:as="com.example.android.xmladapters.ContactPhotoBinder" />

    </cursor-adapter>
NovusMobile
  • 1,813
  • 2
  • 21
  • 48

0 Answers0