Thank you for your answer.
Yes. I wasn't sure which way is better - using two cursors or using
one cursor with Custom CursorAdapter (and curosr inside custom View in
it).
On May 26, 12:27 pm, Kostya Vasilyev wrote:
> I already posted the basic pattern two messages back.
>
> As for nested data,
I already posted the basic pattern two messages back.
As for nested data, you might want to use CursorAdapter (with subclassing)
instead of trying to fit nested queries to SimpleCursorAdapter, which is
more trouble than it's worth.
If you do, you won't need to iterate through the top-level query
Can you give me a link with an example of that?
2011/5/26 Kostya Vasilyev
> You can use the pattern for the top level and the nested query both.
>
> -- Kostya
> 2011/5/26 adek
>
>> I tried to change my code this way. There is still a problem.
>>
>> I tried to check for empty rows but even then
You can use the pattern for the top level and the nested query both.
-- Kostya
2011/5/26 adek
> I tried to change my code this way. There is still a problem.
>
> I tried to check for empty rows but even then I've got this exception
> error.
>
> Maybe the problem is in my way of dealing with thos
I tried to change my code this way. There is still a problem.
I tried to check for empty rows but even then I've got this exception
error.
Maybe the problem is in my way of dealing with those two cursors
(second cursor is in another)
Maybe I'll start from the beggining and you will tell me a bet
I tried to change my code this way. There is still a problem.
I tried to check for empty rows but even then I've got this exception
error.
Maybe the problem is in my way of dealing with those two cursors
(second cursor is in another)
On May 26, 10:18 am, Kostya Vasilyev wrote:
> A cursor's init
A cursor's initial position is -1, right before the first row, so it's quite
enough to do this:
Cursor cursor = . query ...
if (cursor != null) {
... get column indices here
while (cursor.moveToNext()) {
... get data using the indices here ...
}
cursor.close();
}
On Thu, May 26, 2011 at 4:59 PM, Senthil ACS wrote:
>
> Hi,
>
> After you get a cursor object from a query, check the count before
> doing "moveToFirst()".
>
moveToFirst() will not fail, just return false if empty. Just check
the return value
before proceeding.
--
You received this message beca
Thanks. But this is strange.
When I add this condition
if(cursor.getCount() > 0) }
...
My ListView is empty. In LogCat everything looks fine.
On May 26, 9:59 am, Senthil ACS wrote:
> Hi,
>
> After you get a cursor object from a query, check the count before
> doing "moveToFirst()".
>
> if(cur
Hi,
After you get a cursor object from a query, check the count before
doing "moveToFirst()".
if(cursor.getCount() > 0)
{
cursor.moveToFirst();
... processing ...
}
On May 26, 3:12 am, adek wrote:
> Hello,
>
> As a beginner in android java world I need your help. I've got problem
> with
10 matches
Mail list logo