A lot may depend on the detail that you are working with. >From what you wrote it appears to me that your data/object/xml model may be (I am guessing your intentions)
<audio track="" album="" artist="" /> <audio track="" album="" artist="" /> <video track="" album="" artist="" /> <video track="" album="" artist="" /> In this type of representation the children become really the attributes of the parent. So when one clicks on a track you may ask who am I? The answer may come as "audio" or "video". Or if you look the other way around and make your track an independent object then the category becomes the attribute of the track. >From what you are describing it appears to me the earlier model may be better. In that earlier model you may even consider the attributes as "tags" like in social networking as optional attributes on the nature of a base "audio" entity. Hope this helps On Wed, May 4, 2011 at 9:27 AM, Hitendrasinh Gohil <hitendra.virtuei...@gmail.com> wrote: > hi, > > i am having two categories > > within these 2 categories there are three subcategories. > like__ > 1.audio > 1a. track > 1b album > 1c artist > 2.video > 2a. track > 3b album > 2c artist > > I have made one class that handles the click event for track,album and > artist.but how can i know the category whether track is clicked from > audio or video category.because i am using same xml for subcategory. > currently i am managing it through flags.but is there any better way > to do it? > > regards, > hitendrasinh gohil > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- Satya Komatineni http://www.satyakomatineni.com http://www.androidbook.com -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en