Android: Use different layouts in ListFragment using ArrayAdapter - android

Hello everyone and thank you for reading my question!
I'm currently developing an android app that has the following hierarchy:
One FragmentActivity is divided by three ListFragments.
One of these ListFragments uses a custom ArrayAdapter to display a List<> with a xml template on a ListView
This List<> is filled with dataset which are given id's. Datasets with id's lower than 10 are flagged "important", the other ones are flagged "not so important"
This is what I am looking for:
I have two layout templates, and I want to display the "important" datasets with one layout and the "not so important" with the other layout.
I have searched for quite a while now, but it looks like noone has asked a question like this before.
I tried to use a second ListView and apply a second custom ArrayAdapter on it, but unfortunately, there is a restriction: Since I'm using ListFragment, I'm forced to use findViewById like this.
ListView list;
list = (ListView) rootView.findViewById(android.R.id.list);
When I tried to write the second custom ArrayAdapter, it showed an error here:
ListView list;
list_flat = (ListView) rootView.findViewById(android.R.id.list_flat);
Here is the entire ListFragment
public class LeaguePage extends ListFragment{
Global global_var;
ListView list, list_flat;
List <League> leagues = null;
ListAdapter adapter = null;
View rootView;
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.league_page, container, false);
return rootView;
}
#Override
public void onViewCreated(View view, Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onViewCreated(view, savedInstanceState);
list_flat = (ListView) rootView.findViewById(android.R.id.list_flat);
try {
leagues = Leagues_Parser.parse(getActivity().getAssets().open("league_raw.xml"));
} catch (IOException e) {
e.printStackTrace();
}
adapter = new LeagueAdapter (getActivity(), R.layout.list_row, leagues);
list.setAdapter(adapter);
list.setOnItemClickListener(new OnItemClickListener()
{
#Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
// TODO Auto-generated method stub
Global.selectedTeam = Integer.valueOf(leagues.get(arg2).getInternalID());
Global.mViewPager.setCurrentItem(1, true);
}
});
}
}
This is the xml file I pass on to my ArrayAdapter
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="#+id/liga_flat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="25dip"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:paddingBottom ="10dip"
android:textColor="#040404"
android:textSize="25sp"
android:textStyle="normal"
android:typeface="serif" />
</RelativeLayout>
This is the xml layout file for the ListFragment
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="#dimen/activity_vertical_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
tools:context=".Main_Activity$search_page" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="#dimen/activity_vertical_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
tools:context=".Main_Activity$search_page" >
<ListView
android:id="#id/android:list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:dividerHeight="0dp"
android:divider="#null">
</ListView>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:paddingBottom="#dimen/activity_vertical_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
tools:context=".Main_Activity$search_page" >
<ListView
android:id="#+id/android:list2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:divider="#null"
android:dividerHeight="0dp" >
</ListView>
</RelativeLayout>
</RelativeLayout>

You shouldn't give a ListView an ID like this :android:id="#+id/android:list2", the ID of your ListView should be
<ListView android:id="#id/android:list"
...... ></ListView>
or
<ListView android:id="#+id/sampleList"
...... ></ListView>

Related

Custom list layouts not working in emulator

New to Android, sorry if there's something I should be including here that I'm not.
Anyway, I'm trying to make a custom layout for a list. Whenever I try to run the app, it closes and sends a "AppName has crashed" error modal. When I use a built-in android layout, this doesn't happen. I'm not sure if the issue is my code or my emulator (Running on a Nexus 5 with 1GB RAM)
Here's layout/row_layout.xml
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/textView1"
android:textSize="50sp"
android:textStyle="bold"
android:padding="15dp"/>
</LinearLayout>
Here's layout/activity_main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
android:paddingBottom="#dimen/activity_vertical_margin"
android:orientation="vertical"
tools:context=".MainActivity">
<ListView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="#+id/theListView"></ListView>
</LinearLayout>
And here's the onCreate method in MainActivity.java (I haven't edited anything else)
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
String[] favoriteTVShows = {"The Office", "The Wire", "Mr. Robot", "Parks and Rec",
"Fool Us", "Garbage Time", "Last Week Tonight", "Silicon Valley"};
ListAdapter theAdapter = new ArrayAdapter<String>(this, R.layout.row_layout,
favoriteTVShows);
ListView theListView = (ListView) findViewById(R.id.theListView);
theListView.setAdapter(theAdapter);
theListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
#Override
public void onItemClick(AdapterView<?> adapterView,
View view, int position,
long id) {
String tvShowPicked = "You selected " +
String.valueOf(adapterView
.getItemAtPosition(position));
Toast.makeText(MainActivity.this, tvShowPicked,
Toast.LENGTH_SHORT).show();
}
});
}
You have to set the adapter to a view that can contain the text, meaning that instead of using a LinearLayout as a base, use a TextView:
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/textView1"
android:textSize="50sp"
android:textStyle="bold"
android:padding="15dp"/>

Android ListView RSS Reader on a fragment

So.
I'm pretty noob in fragments, and i spent my last days tryin to show a very very simple RSS Reader in an app which has many fragments.
I was following a guide (actually many guides, but this one was the one which had less code.. just for learning purpose: http://www.html.it/pag/19519/android-e-le-applicazioni-di-rete/).
This is the xml about the fragment in which i would to show the RSS Reader (called fragment_main.xml)
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
android:paddingBottom="#dimen/activity_vertical_margin"
android:background="#607D8B"
tools:context=".MainActivity$PlaceholderFragment"
android:id="#+id/main1">
<ImageView
android:id="#+id/newsBanner1"
android:layout_width="wrap_content"
android:layout_height="120sp"
android:layout_marginTop="0dp"
android:gravity="top"
android:layout_marginBottom="10dp"
android:src="#drawable/news_banner"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="News:"
android:id="#+id/newsTitleText1"
android:textSize="20dp"
android:textStyle="bold"
android:layout_marginTop="140dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<ScrollView
android:id="#+id/scrollerNews1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="#+id/newsTitleText1"
android:layout_marginTop="8dp"
android:scrollbars="vertical"
android:fillViewport="true">
<ListView
android:id="#+id/rssListView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</ScrollView>
Yeah it has "main1" id because is the "default" layout fragment at the opening of the app.
And this is the java class
public class NewsFragment extends Fragment {
String feedUrl = "";
ListView rssListView = null;
ArrayList<RSSItem> RSSItems = new ArrayList<RSSItem>();
ArrayAdapter<RSSItem> array_adapter = null;
#Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState){
View setView = inflater.inflate(R.layout.fragment_main, container, false);
feedUrl = "sample_feed_url";
refreshRSSList();
rssListView = (ListView) setView.findViewById(R.id.rssListView);
array_adapter = new ArrayAdapter<RSSItem>(this.getActivity(), R.layout.fragment_main, RSSItems);
rssListView.setAdapter(array_adapter);
refreshRSSList();
return setView;
}
private void refreshRSSList() {
ArrayList<RSSItem> newItems = RSSItem.getRSSItems(feedUrl);
RSSItems.clear();
RSSItems.addAll(newItems);
}
At the moment when i run the app, everything is showed except for the listview (which, i guess, is empty).
Many thanks to whoever will help me :D
When you initialize your array adapter, the layout parameter is wrong. You have mentioned the layout of the fragment. Here it's asking the layout of listview. I mean layout of an item in listview. You need to create a new file in layout and name it as list_item.xml. Define list_item.xml :
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/list_item_textview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:gravity="center_vertical">
</TextView>
Now your array adapter will be
array_adapter =new ArrayAdapter(getActivity(),R.layout.list_item,R.id.list_item_textview,rssItems);
You can also use the constructor which you have defined. What I did explicitly mentions id of TextView. You can see the difference here: link. Let me know if it doesn't work.

Android ListView onItemClick not working

I encountered a silly problem.
I have an identical thing working already, but for the second try, the onItemClick is not doing anything. I re-re-rechecked so many times now, but nothing seems to catch my eye. Please take a look and let me know what is wrong
So here is my setup.
The activity:
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_promotionale);
ListView mylist = (ListView) findViewById(R.id.lv_promotionale);
mylist.setOnItemClickListener(new AdapterView.OnItemClickListener() {
#Override
public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
Toast.makeText(PromotionaleActivity.this,"I touched an item at position"+Integer.toString(position),Toast.LENGTH_SHORT).show();
}
});
The activity layout is:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
android:paddingBottom="#dimen/activity_vertical_margin">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView
android:layout_width="wrap_content"
android:layout_height="370dp"
android:id="#+id/lv_promotionale" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="65dp"
android:weightSum="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="Some text here"
android:id="#+id/textView"
android:paddingLeft="15dp"
android:paddingStart="15dp"
android:paddingTop="15dp"
android:paddingRight="0dp"
android:paddingEnd="0dp"
android:paddingBottom="0dp" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
EDIT
Here is the method where I load my listview with data using an external adapter
public void LoadListWithStuff(){
SQLiteDatabase db = new myDbHelper(getApplicationContext()).getWritableDatabase();
Cursor mCursor = db.rawQuery("select _id,data,numar,idclient,numeclient,tipclient,trimisa from cereri_mst order by data,numar desc" , null);
idid.clear();
idclient.clear();
numeclient.clear();
tipclient.clear();
datacerere.clear();
numarcerere.clear();
trimisa.clear();
if (mCursor.moveToFirst()) {
do {
idid.add(Integer.toString(mCursor.getInt(0)));
datacerere.add(mCursor.getString(1));
numarcerere.add(mCursor.getString(2));
idclient.add(Integer.toString(mCursor.getInt(3)));
numeclient.add(mCursor.getString(4));
tipclient.add(mCursor.getString(5));
trimisa.add(mCursor.getString(6));
} while (mCursor.moveToNext());
}
DisplayCereriAdapter disadpt = new DisplayCereriAdapter(PromotionaleActivity.this,idid,idclient,
numeclient, tipclient,datacerere,numarcerere,trimisa);
ListView lv = (ListView) findViewById(R.id.lv_promotionale);
lv.setAdapter(disadpt);
mCursor.close();
db.close();
}
Also, I must say here that the listview is populated. I can see the contents of the listView. The only problem is that I cannot seem to catch the ItemClick and longClick events on the listview...
Why doesn't it work?????
I am going crazy here...
Thank you
The solution I found was to stop using the checkBox and replace it with ImageView... Now all works fine

Spinner and ListView in same activity

i have a problem which i narrowed it down to a focus problem. At least it seems like a focus problem, i might be wrong.
Declerations:
LogListAdapter adapter;
Spinner filterTypeMenu;
ListView list;
onCreate:
list = (ListView) findViewById(R.id.loglist);
filterTypeMenu = (Spinner) findViewById(R.id.spinner1);
adapter = new LogListAdapter (this, R.layout.row, filteredLogs);
adapter.notifyDataSetChanged();
filterTypeMenu.setOnItemSelectedListener(this); // tried with inner class, same result
in my interface method when i complete my process:
..
..
adapter.notifyDataSetChanged();
..
..
and click listeners:
#Override
public void onItemSelected(AdapterView<?> arg0, View arg1, int position,
long arg3) {
// TODO Auto-generated method stub
Toast.makeText(MainActivity.this, Integer.toString(position),
Toast.LENGTH_LONG).show();
}
#Override
public void onNothingSelected(AdapterView<?> arg0) {
// TODO Auto-generated method stub
}
My main layout:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="#dimen/activity_vertical_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<LinearLayout
android:id="#+id/mainlayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<LinearLayout
android:id="#+id/spinnerlayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Spinner
android:id="#+id/spinner1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:entries="#array/filter_array"
android:prompt="#string/filter"/>
</LinearLayout>
<LinearLayout
android:id="#+id/listlayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:focusableInTouchMode="false">
<ListView
android:id="#+id/loglist"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:focusable="false"
android:focusableInTouchMode="false">
</ListView>
</LinearLayout>
</LinearLayout>
Notify method is called repeatedly real quick and my list is updating quite fast due to behaviour of the process. When i remove the update block of the code, click events of the spinner is active, but when the update block is active, events are not working. I thought this was a focus problem but i couldn't be sure, since i the menu is clickable. The problem is that when i select one of the items in the list, spinner is not selecting that item and keep the old selected value, and the event of the click is not working either. Ideas will be much appreciated.
Funny, i fixed my problem with adding these two settings to the spinner, i was sure i tried this before but oh well, android focus is still a half mystery to me.
filterTypeMenu.setFocusable(true);
filterTypeMenu.setFocusableInTouchMode(true);

java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'

I know that there has been simialr questions but I can't make it work even though I look at those. The error message is:
java.lang.RuntimeException: Your content must have a ListView whose id
attribute is 'android.R.id.list'
. I have tried to change the id to list. In another. This what the code looks like:
public class committeeFragment extends SherlockListFragment {
private CommitteeAdapter adapter;
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
adapter = new CommitteeAdapter(getActivity().getApplicationContext());
setListAdapter(adapter);
}
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
return inflater.inflate(R.layout.fragment_committee, container, false);
}
public void
refreshList() {
adapter.updateDataSet();
adapter.notifyDataSetChanged();
}
}
It's using the following adapter:
public class CommitteeAdapter extends BaseAdapter {
private
ArrayList<StudentCommittee> committeeList;
private Context context;
public CommitteeAdapter(Context context) {
this.context = context;
CommitteeDatabaseAdapter dbAdapter = new CommitteeDatabaseAdapter(context);
committeeList = dbAdapter.readAllCommittees();
}
public void updateDataSet() {
CommitteeDatabaseAdapter dbAdapter = new CommitteeDatabaseAdapter(context);
committeeList = dbAdapter.readAllCommittees();
}
#Override
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater vi = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
StudentCommittee committee = committeeList.get(position);
View v = vi.inflate(R.layout.list_item_committee, null);
TextView sectionName = (TextView) v.findViewById(R.id.committee_namn);
sectionName.setText(committee.getName());
return v;
}
#Override
public int getCount() {
return committeeList.size();
}
#Override
public StudentCommittee getItem(int position) {
return committeeList.get(position);
}
#Override
public long getItemId(int position) {
return position;
}
}
Here is the xml-file that specifies the list(fragment_committee):
<?xml version="1.0" encoding="utf-8"?> <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:tag="#string/tag_fragment_committee"
android:background="#color/white" >
<TextView
style="#style/AppsolutText.Headline"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Festerier" />
<View
android:layout_width="fill_parent"
android:layout_height="2dp"
android:background="#drawable/divider_sliding_menu_item"/>
<ListView
android:id="#+id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
style="#style/AppsolutText.Normal"
android:id="#android:id/empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Uppdatera för att se en lista över festerier och fadderier. Kräver internetanslutning."/>
</LinearLayout>
Here is the xml for the list item:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<ImageView
android:id="#+id/committee_symbol"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:paddingBottom="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp" />
<TextView
android:id="#+id/committee_namn"
style="#style/AppsolutText.ListHeader"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
I hope that you can figure out what's wrong. I have another listview that has the same id (list) in another xml-file within the project. I don't know if that's a problem. Please help me solve the problem.
The problem is here :
android:id="#+id/list"
you are adding a new id for your ListView but ListFragment needs a default Android ListView Id
change your ListView Id to :
<ListView
android:id="#id/android:list"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
Change your ListView in XML to have the following id:
<ListView
android:id="#android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
It's a requirement of using ListFragment/SherlockListFragment
http://developer.android.com/reference/android/app/ListFragment.html
ListFragment has a default layout that consists of a single list view. However, if you desire, you can customize the fragment layout by returning your own view hierarchy from onCreateView(LayoutInflater, ViewGroup, Bundle). To do this, your view hierarchy must contain a ListView object with the id "#android:id/list" (or list if it's in code)
You can try to clean your project. If any xml releted error have , you can find it. Then you can change your list id . Find the list id are exist into your gen folder R.java class.
I decided to stop using actionbarsherlock and use the support libraries instead to get action bar in Android 2.1 and above. After doing this, i got the "java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'". What i did to remedy this problem was
to read this http://developer.android.com/reference/android/app/ListFragment.html#q=fragment
then change my fragment layout file from
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/item_detail"
style="?android:attr/textAppearanceLarge"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
android:textIsSelectable="true"
tools:context=".ItemDetailFragment" />
to
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="8dp"
android:paddingRight="8dp"
tools:context=".ItemDetailFragment">
<ListView android:id="#id/android:list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#00FF00"
android:layout_weight="1"
android:drawSelectorOnTop="false"/>
<TextView android:id="#+id/item_detail"
style="?android:attr/textAppearanceLarge"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
android:textIsSelectable="true"/>
<TextView android:id="#id/android:empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FF0000"
android:text="No data"/>
... and voila, the RunTimeException with missing android.R.id.list was gone! Of course, i need to edit my new layout and fix it properly, but the key issue here was that i had overridden the fragment layout in its onCreateView method. ActionBarSherlock DID NOT have a problem with this, but with the Android support library, if u do this, you MUST have a ListView in your XML Layout, with the android:id="#id/android:list" as stated in the info linked to above.
Hope this helps (coming from a total newb in Android app dev)!

Categories

Resources