cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Grieve <agri...@chromium.org>
Subject Re: [Android] Config.xml Android Preference Issues
Date Thu, 31 Jan 2013 03:49:39 GMT
I think you can get the id at runtime via:
http://steven.bitsetters.com/2007/11/27/accessing-android-resources-by-name-at-runtime/

Or, have a build step copies the file they list into
res/drawable/splash.png. Might be nice if there were x-platform config.xml
settings for the splashscreen with all orientations & resolutions, and have
CLI put them in the correct spot.


On Wed, Jan 30, 2013 at 10:38 PM, Simon MacDonald <simon.macdonald@gmail.com
> wrote:

> I think we should make it a bit more smart. Would using reflection to
> determine the value of R.drawable.splash be out of the question?
>
> Simon Mac Donald
> http://hi.im/simonmacdonald
>
>
> On Wed, Jan 30, 2013 at 6:30 PM, Joe Bowser <bowserj@gmail.com> wrote:
>
> > BTW: This does technically work for displaying a splashscreen:
> >
> >     <preference name="splashscreen" value="0x7f020009" />
> >
> > That being said, you'd have to look in R.java to see what this value
> > should be.  We should make this a bit more smart.
> >
> > Thoughts???
> >
> > Joe
> >
> > On Wed, Jan 30, 2013 at 2:30 PM, Joe Bowser <bowserj@gmail.com> wrote:
> > > Hey
> > >
> > > I just went added some code to the config class, and I noticed that
> > > certain things don't make any sense.  For example, we currently have
> > > this in DroidGap.java:
> > >
> > >             super.setIntegerProperty("splashscreen",
> > > R.drawable.splash); // load splash.jpg image from the resource
> > > drawable directory
> > >
> > > Now, R.drawable.splash is an integer property, but I can't put that in
> > > config.xml.   Instead it would be the integer value, however the
> > > integer value doesn't work.  Should we somehow make this
> > > non-configurable so that it always has to use splash.jpg?  I don't
> > > think that giving the users the choice on what resource to use in
> > > config.xml is worth the possible goofiness that could happen with
> > > this.
> > >
> > > Also, on another note.  Currently background colors are represented in
> > > hex on Android, similar to HTML colors.  The first byte is the Alpha
> > > Levels, with the following bytes representing RGB values similar to
> > > the web. Is this fine for setBackgroundColor?  Or should we figure out
> > > how to eliminate the alpha byte?
> > >
> > > Joe
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message