Now that my boss does not like context menu, I need to put a delete
button and delete selected record from listview. in this case how will
i get _id for the selected row ? for context menu i used to get as
follows

AdapterView.AdapterContextMenuInfo mnuDelinfo =
(AdapterView.AdapterContextMenuInfo) item
                                        .getMenuInfo();

                        delete(mnuDelinfo.id);


regards and thanks in advance

On Dec 18, 9:44 pm, Jags <[email protected]> wrote:
> thanks a lot mr mark. I was able to figure out problem thanks to
> another review. But it seems delete.png is still not shown on context
> menu.
>
> regards
>
> On Dec 18, 5:08 pm,Jags<[email protected]> wrote:
>
> > is it mandatory to be the db created by SQLiteOpenhelper ?
>
> > is it mandatory to be the field names all small ?
>
> > I compared the whole code with mark's reviewed it umpteen number of
> > times, dont understand where is any trick left ?
>
> > I am gonna try changing the 2 field names to all small case
>
> > i downloaded the code from above link and it works, but in context
> > menu the icon is not being displayed, and while adding record it
> > crashes. I am using 1.5
>
> > Are there any known issues ?
>
> > regards
>
> > On Dec 18, 1:47 pm,Jags<[email protected]> wrote:
>
> > > anybody out there ? the values in the cursor are perfect, i printed
> > > them one by one, but the rows are blank in the listview
>
> > > On Dec 18, 12:38 pm,Jags<[email protected]> wrote:
>
> > > > now, after fixing those things, I get 2 items in the list [which is
> > > > correct], but unfortunately, these are shown blank, no texts !. Am I
> > > > missing something somewhere ?
>
> > > > regards
>
> > > > On Dec 18, 12:17 pm,Jags<[email protected]> wrote:
>
> > > > > Hey Mark,
>
> > > > > yes this is what i am trying to do. But the problem is, I dont see a
> > > > > ListView in your main layout. neither you do a setContentView() in
> > > > > your OnCreate method. it was crashing for me when i did a
> > > > > setContentView, it is now showing blank list. How can I debug adapters
> > > > > to see the records ? records are coming to the cursor, I am sure. No
> > > > > exception either !
>
> > > > > regards
>
> > > > > On Dec 17, 6:28 pm, "Mark Murphy" <[email protected]> wrote:
>
> > > > > > > If I want to refresh that in the same activity, then ? For 
> > > > > > > example, i
> > > > > > > need a cursoradapter and select a row and delete, that row is 
> > > > > > > deleted
> > > > > > > and record is also deleted, and dsplay updated. on click of a 
> > > > > > > button
> > > > > > > in the same activity. which example of yours demonstrate this 
> > > > > > > type ?
>
> > > > > > I confess to having some difficulty in following your questions. 
> > > > > > However,
> > > > > > I think this may help:
>
> > > > > >http://github.com/commonsguy/cw-android/tree/master/Database/Constants/
>
> > > > > > --
> > > > > > Mark Murphy (a Commons Guy)http://commonsware.com
> > > > > > Android App Developer Books:http://commonsware.com/books.html
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to