Tuesday, October 26, 2010

[android-developers] Re: Using newer wallpaer them on older Android version

Can you have a separate res/values directory for each api level?

On Oct 26, 5:27 pm, Romain Guy <romain...@android.com> wrote:
> You should create your own theme. Then in res/values-v4 your theme
> just inherits from Theme.NoTitleBar, but in res/values-v8, it inherits
> from Theme.Wallpaper.NoTitlebar.
>
>
>
> On Tue, Oct 26, 2010 at 5:25 PM, jotobjects <jotobje...@gmail.com> wrote:
> > Maybe there is no answer to that question on this forum?
>
> > The general part of the question is what happens when you use a Theme
> > that is not supported on all versions of the SDK that your app runs on
> > like this -
>
> >    <uses-sdk
> >        android:minSdkVersion="4"
> >        android:targetSdkVersion="8" />
>
> >    <application
> >        android:icon="@drawable/foobar"
> >        android:theme="@android:style/Theme.Wallpaper.NoTitleBar">
>
> > The minSdkVersion is 4 but Theme.Wallpaper.NoTitleBar isn't available
> > until level 5.
>
> > There would be lots of other cases of attributes, themes, and styles
> > that would be later than level 4 that you want to use where available
> > but want to handle gracefully on earlier devices. I.e., not being
> > locked into the lowest common denominator.
>
> > On Oct 26, 11:53 am, jotobjects <jotobje...@gmail.com> wrote:
> >> Does anybody have experience or advice on this scenario -
>
> >> Say I want to use one of the wallpaper themes from 2.0 (api level 5)
> >> like -
>
> >>     android:theme="@android:style/Theme.Wallpaper.NoTitleBar"
>
> >> And I also want to support 1.6 (api level 4) devices
>
> >> My questions about that scenario are -
>
> >> (1) what happens if I use a 2.0 theme on a device with a 1.6 version
> >> device?  Is the theme ignored?
>
> >> (2) Can I check the api version and use a transparent background on
> >> the post-1.6 devices (so the wallpaper is the background) and a non-
> >> transparent background on the 1.6 devices (where the wallpaper will
> >> not show through)? What is a good technique?
>
> > --
> > 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+unsubscribe@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate