[android-developers] Re: Activity library
I've derived from standard Activity classes. Specifically, because I use a web service that gives me list data in a paged format, I wrote a PagedListActivity class that's derived from ListActivity. I then use that all over the place and derive further from it. So I guess I don't understand your question. Seems to me that you should figure out what are the problems with the integration of your new abstract superclass and your derived classes, rather than trying to work around the problems that the Android tools are trying to tell you. On Jan 12, 4:59 pm, Raconteur wrote: > Hi gang, > > Sorry for the cruddy subject line, but couldn't think of a short way > to phrase this. > > I want to create an abstract subclass of Activity that adds some of > the basic functionality that our team requires in all Activity > subclasses. > > I am working in eclipse (Galileo with ADT), and when I try to make an > Android project and add the class there, I get weird problems with > class verification of the subclasses of our Activity class > (XDCActivity). > > I tried making just a plain Java project and adding the class in > there, but then I lose the ability to invoke R and other conveniences. > > Can someone give me an idea of how to go about accomplishing this? > > In a nutshell, what I want is to insert functionality bewteen > android.app.Activity and our proprietary Activity subclasses in > XDCActivity so that my developers can inherit the requisite > functionality. > > Please let me know if you need more detail... hopefully this is > enough. > > Cheers, > > Chris -- 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
[android-developers] Re: Activity library
Your Activity subclass was probably in the same Eclipse project as it was used in, Brion. It sounds like the OP wants the subclass to be in a different project. In Eclipse you can have an Android project depend on other Java projects. The classes get packaged in. If you have an Android project depend on other Android projects, however, the classes from those don't get packaged in. I don't know a good solution. If using Subversion for source control there are SVN externals for including directories from other projects. Sometimes you'd need individual files from other projects in the resource directories, however, which that can't handle. On Jan 13, 12:10 pm, Brion Emde wrote: > I've derived from standard Activity classes. Specifically, because I > use a web service that gives me list data in a paged format, I wrote a > PagedListActivity class that's derived from ListActivity. I then use > that all over the place and derive further from it. > > So I guess I don't understand your question. Seems to me that you > should figure out what are the problems with the integration of your > new abstract superclass and your derived classes, rather than trying > to work around the problems that the Android tools are trying to tell > you. > > On Jan 12, 4:59 pm, Raconteur wrote: > > > Hi gang, > > > Sorry for the cruddy subject line, but couldn't think of a short way > > to phrase this. > > > I want to create an abstract subclass of Activity that adds some of > > the basic functionality that our team requires in all Activity > > subclasses. > > > I am working in eclipse (Galileo with ADT), and when I try to make an > > Android project and add the class there, I get weird problems with > > class verification of the subclasses of our Activity class > > (XDCActivity). > > > I tried making just a plain Java project and adding the class in > > there, but then I lose the ability to invoke R and other conveniences. > > > Can someone give me an idea of how to go about accomplishing this? > > > In a nutshell, what I want is to insert functionality bewteen > > android.app.Activity and our proprietary Activity subclasses in > > XDCActivity so that my developers can inherit the requisite > > functionality. > > > Please let me know if you need more detail... hopefully this is > > enough. > > > Cheers, > > > Chris > > -- 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
[android-developers] Re: Activity library
Ah, thanks. I've had luck using the directory links in Eclipse. In project properties, under build path, you add a directory link to the other project's files. That has worked for me. Thanks for the clarification. Now I see it with the OP's reference to Library. On Jan 13, 10:28 am, Lance Nanek wrote: > Your Activity subclass was probably in the same Eclipse project as it > was used in, Brion. > > It sounds like the OP wants the subclass to be in a different project. > In Eclipse you can have an Android project depend on other Java > projects. The classes get packaged in. > > If you have an Android project depend on other Android projects, > however, the classes from those don't get packaged in. I don't know a > good solution. > > If using Subversion for source control there are SVN externals for > including directories from other projects. Sometimes you'd need > individual files from other projects in the resource directories, > however, which that can't handle. > > On Jan 13, 12:10 pm, Brion Emde wrote: > > > > > I've derived from standard Activity classes. Specifically, because I > > use a web service that gives me list data in a paged format, I wrote a > > PagedListActivity class that's derived from ListActivity. I then use > > that all over the place and derive further from it. > > > So I guess I don't understand your question. Seems to me that you > > should figure out what are the problems with the integration of your > > new abstract superclass and your derived classes, rather than trying > > to work around the problems that the Android tools are trying to tell > > you. > > > On Jan 12, 4:59 pm, Raconteur wrote: > > > > Hi gang, > > > > Sorry for the cruddy subject line, but couldn't think of a short way > > > to phrase this. > > > > I want to create an abstract subclass of Activity that adds some of > > > the basic functionality that our team requires in all Activity > > > subclasses. > > > > I am working in eclipse (Galileo with ADT), and when I try to make an > > > Android project and add the class there, I get weird problems with > > > class verification of the subclasses of our Activity class > > > (XDCActivity). > > > > I tried making just a plain Java project and adding the class in > > > there, but then I lose the ability to invoke R and other conveniences. > > > > Can someone give me an idea of how to go about accomplishing this? > > > > In a nutshell, what I want is to insert functionality bewteen > > > android.app.Activity and our proprietary Activity subclasses in > > > XDCActivity so that my developers can inherit the requisite > > > functionality. > > > > Please let me know if you need more detail... hopefully this is > > > enough. > > > > Cheers, > > > > Chris -- 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
[android-developers] Re: Activity library
I did it the following way: - Create your Android project as normal - Right click the project in Eclipse, select Properties > Builders - Uncheck all the builders apart from Java Builder - Remove the unnecessary Android files (Manifest, res, gen, etc) - Export your project as a Jar file via right click > Export - In the project you want to use the jar, set the jar location to the build path and subclass the abstract class. On Jan 12, 11:59 pm, Raconteur wrote: > Hi gang, > > Sorry for the cruddy subject line, but couldn't think of a short way > to phrase this. > > I want to create an abstract subclass of Activity that adds some of > the basic functionality that our team requires in all Activity > subclasses. > > I am working in eclipse (Galileo with ADT), and when I try to make an > Android project and add the class there, I get weird problems with > class verification of the subclasses of our Activity class > (XDCActivity). > > I tried making just a plain Java project and adding the class in > there, but then I lose the ability to invoke R and other conveniences. > > Can someone give me an idea of how to go about accomplishing this? > > In a nutshell, what I want is to insert functionality bewteen > android.app.Activity and our proprietary Activity subclasses in > XDCActivity so that my developers can inherit the requisite > functionality. > > Please let me know if you need more detail... hopefully this is > enough. > > Cheers, > > Chris -- 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