Made XmlAdapter sample a standalone application.
Change-Id: If34f2086da65f81968f630a42e4b9e725cb65efe
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -27,7 +27,6 @@ import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.provider.ContactsContract;
|
||||
import android.view.View;
|
||||
import android.widget.Adapters;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
@@ -30,6 +30,8 @@ public class ContactsListActivity extends ListActivity {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.contacts_list);
|
||||
setListAdapter(Adapters.loadAdapter(this, R.xml.contacts));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ package com.example.android.xmladapters;
|
||||
import android.app.ListActivity;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.widget.Adapters;
|
||||
|
||||
/**
|
||||
* This activity uses a custom cursor adapter which fetches a XML photo feed and parses the XML to
|
||||
|
||||
@@ -20,7 +20,6 @@ import android.app.ListActivity;
|
||||
import android.content.XmlDocumentProvider;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.widget.Adapters;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
|
||||
/**
|
||||
@@ -39,6 +38,7 @@ public class RssReaderActivity extends ListActivity {
|
||||
setContentView(R.layout.rss_feeds_list);
|
||||
setListAdapter(Adapters.loadCursorAdapter(this, R.xml.rss_feed,
|
||||
"content://xmldocument/?url=" + Uri.encode(FEED_URI)));
|
||||
|
||||
getListView().setOnItemClickListener(new UrlIntentListener());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ package com.example.android.xmladapters;
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.view.View;
|
||||
import android.widget.Adapters;
|
||||
import android.widget.ImageView;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user