On Thu, Jan 31, 2013 at 1:34 PM, Joe Bowser <[email protected]> wrote:

> So, right now I have this for the splashscreen:
>
>     <preference name="splashscreen" value="splash" />
>
> And I have this in Config.java for splashscreen prefs:
>
>                         String value = xml.getAttributeValue(null,
> "value");
>
>                         int resource = 0;
>
> do you mean == null here?

>                         if (value != null)
>                         {
>                             value = "splash";
>                         }
>
>                         resource =
> action.getResources().getIdentifier(value, "drawable",
> action.getPackageName());
>
>                         action.getIntent().putExtra(name, resource);
>
> So, this way you can just specify the name.  We could add the
> extension, but we'll just strip that off anyway, since it's not
> relevant as long as it's one of the supported Android types.  We could
> do error checking on that.
>

Sounds good. I do also like the idea of making this a build step in the
future so that it's more x-platform. We've got bigger fish to fry before we
worry about that though.



>
>
> On Wed, Jan 30, 2013 at 9:29 PM, Joe Bowser <[email protected]> wrote:
> > You can get the ID at runtime.  That's actually how the config class
> works.
> >
> > Perhaps there should be some cross-platform settings for the
> > splashscreen with all the orientations & resolutions.  I honestly
> > think that we shouldn't have a splashscreen setting and that instead
> > the user just has to copy them or use the CLI to do it.  That way they
> > have less rope to hang themselves.
> >
> >
> > On Wed, Jan 30, 2013 at 7:49 PM, Andrew Grieve <[email protected]>
> wrote:
> >> 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 <
> [email protected]
> >>> 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 <[email protected]> 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 <[email protected]>
> 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
> >>> >
> >>>
>

Reply via email to