It was a bit kludgie...but for me as a newbie to eclipse...it was not to
painful :-).

On Mon, Feb 1, 2010 at 3:28 PM, Indicator Veritatis <[email protected]>wrote:

> And switching back to 1.5 usually works for me. But both your approach
> and mind sound like kludges. There should be a better solution. I
> really do not want, for example, to have to create this extra
> directory for EVERY tutorial I complete using SDK 2.1. Do you?
>
> On Feb 1, 3:01 pm, "Ben & Jerry's South Bay" <[email protected]>
> wrote:
> > I just created a new folder within eclipse called 'drawable' and then
> > created my new files there.  It worked for me.
> >
> > On Feb 1, 2010 12:18 PM, "Indicator Veritatis" <[email protected]>
> wrote:
> >
> > It seems the online tutorials have not been rewritten to reflect
> > Android 2.1. For they still refer to 'drawable' and 'res/drawable',
> > but when I create a new project for 2.1 using the wizard, I do not GET
> > any such directory. Instead, I get 'res/drawable-hdpi', 'res/drawable-
> > ldpi' and 'res/drawable-mdpi'.
> >
> > Now for some tutorials, I have been able to get by by putting files in
> > 'res/drawable-hdpi'. But for the TabLayout tutorial,
> http://developer.android.com/resources/tutorials/views/hello-tabwidge...,
> > this does not work. I still get the error message (on completion of
> > step 3) "R.drawable.ic_tab_artists cannot be resolved".
> >
> > The files "ic_tab_artists_grey.png" and "ic_tab_artists_whit.png"
> > really are in res/drawable-hdpi.
> >
> > I also tried changing the name 'drawable' to 'drawable-hdpi', but Java
> > did not like the '-' in the name (no surprise).
> >
> > So how are we supposed to get this to work? Go back to 1.5? Surely
> > there is a better way.
> >
> > Just for clarity's sake, the line of code I get the error on is: spec
> > = tabHost.newTabSpec("artists").setIndicator("Artists",
> > //                          res.getDrawable
> > (R.drawable.ic_tab_artists))
> >                      .setContent(intent);
> >
> > in HelloTabWidget.java.
> >
> > I get the same class of error message on the other three
> > res.getDrawable calls, too.
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Beginners" group.
> >
> > NEW! Try asking and tagging your question on Stack Overflow athttp://
> stackoverflow.com/questions/tagged/android
> >
> > To unsubscribe from this group, send email to
> > [email protected]<android-beginners%[email protected]><android-beginners%2Bunsubscr
> [email protected]>
> > For more options, visit this group athttp://
> groups.google.com/group/android-beginners?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> [email protected]<android-beginners%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to