Questions tagged [simplecursortreeadapter]

Use this tag for questions related to SimpleCursorTreeAdapter class, used in Android development.

is an easy adapter to map columns from a cursor to TextViews or ImageViews defined in an XML file, as mentioned in the official page.


It is strongly recommended to use in your question, if you are using this tag too.

21 questions
15
votes
2 answers

CursorTreeAdapter with search implementation

I'm making an application for android and I'm using CursorTreeAdapter as ExpandableListView. I want to use a search box for displaying the filtered ExpandableListView items. Like this: Here's the code what I've written so…
4
votes
2 answers

NPE: CursorTreeAdapter$MyCursorHelper.changeCursor(Cursor, boolean)' on a null object reference

I'm trying to get data from my database in different cursors and show it in an ExpandableListView separated by groups. Like the following: History tasks (to cursor 0) History 1 History 2 Geography tasks (to cursor 1) Geography 1 Geography…
David
  • 859
  • 1
  • 13
  • 33
4
votes
0 answers

How to fix this should only be called when the cursor is valid using ExpandableListView

Hi i am using ExpandableListView with AsyncQueryHandler as given in google android samples. But i am getting some exception saying this should only be called when the cursor is valid E/AndroidRuntime(28265): FATAL EXCEPTION:…
Bora
  • 1,903
  • 3
  • 26
  • 52
2
votes
0 answers

Why the getChildrenCursor in SimpleCursorTreeAdapter of ExpandableListView doesn't work?

I am new in Android.I have a SQL database and want to load data from it in ExpandableListView and use the SimpleCursorTreeAdapter.I have been test fetchGroup and fetchChildren and them work good.But in logcat, the getChildrenCursor doesn't…
1
vote
0 answers

android ExpandableListView and loader

I'm trying to use a ExpandableListView with loader but i have some problem. My objectif is to make a first query on my database and i group it by month, then for each month made a query for all depense by month. I'm using a custom content provider…
dav
  • 43
  • 4
1
vote
1 answer

ExpandableListView using SimpleCursorTreeAdapter scrolls to top on update

I have created an ExpandableListAdapter by extending SimpleCursorTreeAdapter. The cursors are managed by loaders. When the list is displayed to user , I start a background service to fetch latest data from server. If the server returns new data I…
1
vote
1 answer

Usage of '_id' on ExpandableListView with a CursorTreeAdapter

Usage of _id is not clear enough in my mind. Considering all possible actions(onChildClick,onItemClick,onExpand,onCollapse etc. or even drawings) on ExpandableListView below; =A============== -B----------- -C----------- =D============== …
guness
  • 5,123
  • 7
  • 50
  • 79
1
vote
1 answer

SimpleCursorTreeAdapter causing an error

Below is the code from my actvity along with a inner class that is a sub-class of Simple Cursor Tree Adapter. The problem is when i click child elements of the There is an error protected void onStart() { super.onStart(); SQLiteDatabase db =…
Anuranjit Maindola
  • 1,487
  • 1
  • 14
  • 30
1
vote
0 answers

How to manage cursor in SimpleCursorTreeAdapter when getChildrenCursor uses rawQuery

I have some legacy code that uses rawQuery to create Cursors. The raw query strings are complicated and very long. I'm using these raw queries in the getChildrenCursor() of a SimpleCursorTreeAdapter. The docs say I have to manage my cursors, so…
LEO
  • 2,464
  • 24
  • 31
0
votes
1 answer

failed to put View set to invisible

I'm trying to put a view (in list_child) set to invisible if one child is null ( in an expandable listview popluated by external sqlite database and using simplecursortreeadapater) ..I tried to do it like this: 1. Intialise the view inside the…
Zouhair
  • 115
  • 1
  • 2
  • 11
0
votes
1 answer

Trouble with viewbinder Simplecursortreeadapter -unable to convert string to blob

I have pictures in my sqlite prepopulated database, i'm using Simplecursortreeadapter to pass data to exepndablelistview , but the app crush when opening a childview with a picture and in logcat i got "UNABLE TO CONVERT STRING TO BLLOB'. After…
0
votes
1 answer

How to add a header row to a list of child views of an expandablelistview that uses simplecursortreeadapter

I'm using a simplecursortreeadapter to populate an expandablelistview and want to have a row at the top of all the children views that has titles for the data. Group 1 Name [Expanded] Header (Date, Name, $) Child 1 (07/12/2017, Chad, 50.00) Child…
0
votes
3 answers

Android Simple Cursor adapter and Cursor

I have build an app that take data with different attribute, adds them in the database and then shows it through a ListView. I have done the part where data are added, but I Can't figure out how to fetch it(for now I just want the name) from the…
0
votes
1 answer

I Want to populate the Expandable Listview from the data stored in the sqlite database

I want to populate the Expandable Listview from the data stored in the sqlite database. my Table is id int pk name varchar mobile varchare age int and I want to display name and when I click on that name it will show the mobile and age in expand…
0
votes
1 answer

SimpleCursorTreeAdapter with two levels

For my project I have this scenario where I want to put one SimpleCursorTreeAdapter into another one to make it two level tree. Children of the first SimpleCursorTreeAdpater have their own children too. How can I achieve this? I searched but…
zeeshan
  • 4,255
  • 1
  • 42
  • 53
1
2