GitHub user AlexTalis opened a pull request:

    https://github.com/apache/cordova-android/pull/168

    CB-8753 Maintain splash screen aspect ratio

    This pull request implements https://issues.apache.org/jira/browse/CB-8753. 
Apologies for multiple commits. I was trying to edit the commit message to 
include CB-8753 in the summary and ended up with three commits instead of one. 
I'm new to Git and Github.
    
    There are some things about existing code that I did not completely 
understand. I want to list them here to help in the review process. If you know 
what I didn't understand it may help you find problems with my code changes.
    
    - Is there a reason why most fields in SplashScreenInternal are static? It 
seems like they could just be private instance fields.
    
    - What is the purpose of adding preferences to activity's intent extras in 
CordovaPreferences.copyIntoIntentExtras(Activity)? Not all preferences are 
copied and I did not add my new preferences either. Should I?
    
    - Why does SplashScreenInternal keep getting preferences from 
CordovaPreferences object instead of just storing them in instance fields 
during initialization? For example, drawableId is retrieved like this 
throughout the class:
    
        int drawableId = preferences.getInteger("SplashDrawableId", 0);
    
    Why not just have a drawableId instance variable and store the value in it 
once during initialization?
    
    - Is it OK that the new preferences are only supported on Android?

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/AlexTalis/cordova-android 3.7.x

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-android/pull/168.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #168
    
----
commit e572f95eb794461ad8bb7459175fd3b034b5202e
Author: atalis <alex.ta...@yahoo.com>
Date:   2015-03-25T20:47:56Z

    Added "SplashMaintainAspectRatio” boolean preference to maintain Splash
    Screen aspect ratio instead of scaling it to dialog.
    Added “SplashReloadOnOrientationChange” boolean preference to reload
    drawable when orientation changes.
    Notify plugins of orientation changes by posting "orientationChanged"
    message.

commit e02a50058749c7411f64a3cebe75555ed7b9f4d2
Author: atalis <alex.ta...@yahoo.com>
Date:   2015-03-25T20:47:56Z

    CB-8753 Maintain splash screen aspect ratio
    - Added "SplashMaintainAspectRatio” preference to maintain Splash Screen
    aspect ratio instead of scaling it to dialog.
    - Added “SplashReloadOnOrientationChange” boolean preference to reload
    drawable when orientation changes.
    - Notify plugins of orientation changes by posting "orientationChanged"
    message.

commit 1ca3ed211d296c26712c1acdf9428cd7756fc4f4
Author: atalis <alex.ta...@yahoo.com>
Date:   2015-03-26T04:24:24Z

    CB-8753 Maintain splash screen aspect ratio
        - Added "SplashMaintainAspectRatio” preference to maintain Splash
    Screen aspect ratio instead of scaling it to dialog.
        - Added “SplashReloadOnOrientationChange” boolean preference to
    reload drawable when orientation changes.
        - Notify plugins of orientation changes by posting
    "orientationChanged" message.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to