Yes, Eclipse sucks. BTW, does anyone now know hard or easy it is to write plugins for Eclipse, especially plugins which generate code, or parse and/or modify code in code windows? I'd like to create a plugin which when given an activity class, and a layout, used as a view in the activity would generate typed members for all widgets and will write the code to find them, e.g. if there's a layout and 2 buttons w/ resource ids R.id.button1 and R.id.button2 in a nested layout w/ id R.id.buttonPanel, the plugin would generate the following code:
private LinearLayout mButtonPanel; private Button mButton1; private Button mButton2; and in onCreate it would insert: mButtonPanel = (LinearLayout)findViewById(R.id.buttonPanel); mButton1 = (Button)mButtonPanel.findViewById(R.id.button1); mButton2 = (Button)mButtonPanel.findViewById(R.id.button2); This will avoid some hair-pulling errors I occasionally make (and probably other guys too). If writing plugins is not easy, I'll just create a stand-alone app which parses the layout file and creates 2 snippets of code ready to be pasted. Cheers On Fri, Apr 3, 2009 at 2:51 PM, Al Sutton <a...@funkyandroid.com> wrote: > > D'oh..... > > Build.VERSION doesn't resolve, but Build.VERSION.RELEASE does. > > Thanks for the pointer. > > Al. > > > -----Original Message----- > From: android-developers@googlegroups.com > [mailto:android-develop...@googlegroups.com] On Behalf Of Stoyan Damov > Sent: 03 April 2009 12:31 > To: android-developers@googlegroups.com > Subject: [android-developers] Re: Determining the firmware version > > > My code uses Build.VERSION.RELEASE, Build.VERSION.INCREMENTAL and > Build.VERSION.SDK and compiles just fine w/ the 1.1. SDK > > Are you compiling with a cupcake SDK or something? > > Cheers > > On Fri, Apr 3, 2009 at 2:15 PM, Al Sutton <a...@funkyandroid.com> wrote: >> >> Try using it in eclipse. Using the 1.1 SDK I get the following error; >> >> android.os.Build.VERSION cannot be resolved >> >> Al. >> >> >> --- >> >> * Written an Android App? - List it at http://andappstore.com/ * >> >> ====== >> Funky Android Limited is registered in England & Wales with the >> company number 6741909. The registered head office is Kemp House, >> 152-160 City Road, London, EC1V 2NX, UK. >> >> The views expressed in this email are those of the author and not >> necessarily those of Funky Android Limited, it's associates, or it's >> subsidiaries. >> >> >> -----Original Message----- >> From: android-developers@googlegroups.com >> [mailto:android-develop...@googlegroups.com] On Behalf Of Stoyan Damov >> Sent: 03 April 2009 11:59 >> To: android-developers@googlegroups.com >> Subject: [android-developers] Re: Determining the firmware version >> >> >> What??? android.os.Build is not part of the public API??? >> Why can I see it here then? >> >> http://developer.android.com/reference/android/os/Build.VERSION.html >> >> On Fri, Apr 3, 2009 at 1:20 PM, Al Sutton <a...@funkyandroid.com> wrote: >>> >>> Is there any way to determine the version of Android that an app is >>> running on? >>> >>> The reason being my latest idea was to turn off my on-screen keypad >>> when running on cupcake. The problem is the firmware version shown on >>> the about screen comes from android.os.Build.VERSION which appears to >>> be a private API. >>> >>> Does anyone know anywhere else it can be obtained from in an approved >>> manner? >>> >>> Al. >>> >>> --- >>> >>> * Written an Android App? - List it at http://andappstore.com/ * >>> >>> ====== >>> Funky Android Limited is registered in England & Wales with the >>> company number 6741909. The registered head office is Kemp House, >>> 152-160 City Road, London, EC1V 2NX, UK. >>> >>> The views expressed in this email are those of the author and not >>> necessarily those of Funky Android Limited, it's associates, or it's >>> subsidiaries. >>> >>> >>> >>> > >>> >> >> >> >> >> > >> > > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---