Skip to content


Subversion checkout URL

You can clone with
Download ZIP


[New Feature - 3.4] Show date time picker with a dialog style (configurable) #122

wants to merge 5 commits into from

2 participants


This change allows you to specify, in build.yml, that you want the date/time picker to show up as a dialog on Android. This setting is called date_time_picker_dialog under android.

The default date/time picker shows up full screen, which is not very pretty on devices with large screens. Setting the theme to dialog makes it dim the WebView and show the date picker as a small box on the screen, which looks a lot better.

Since this is aesthetic, I made this change configurable, and it defaults to the current behavior.


feature was dropped from 4.0

@genywind genywind closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
8 platform/android/Rhodes/AndroidManifest.xml.erb
@@ -52,7 +52,13 @@
<activity android:name='' android:configChanges='orientation' android:screenOrientation='<%= @screenOrientation %>'/>
<activity android:name='' android:screenOrientation='landscape'/>
<activity android:name='com.rhomobile.rhodes.signature.ImageCapture' android:configChanges='orientation' android:screenOrientation='<%= @screenOrientation %>'/>
- <activity android:name='com.rhomobile.rhodes.datetime.DateTimePickerScreen' android:configChanges='orientation' android:screenOrientation='<%= @screenOrientation %>'/>
+ <activity android:name='com.rhomobile.rhodes.datetime.DateTimePickerScreen'
+ <% if @dateTimePickerDialog %>
+ android:theme="@android:style/Theme.Dialog"
+ <% end %>
+ android:configChanges='orientation'
+ android:screenOrientation='<%= @screenOrientation %>'
+ />
<activity android:name='com.rhomobile.rhodes.mapview.MapView' android:configChanges='orientation' android:screenOrientation='<%= @screenOrientation %>'/>
<activity android:name='com.rhomobile.rhodes.mapview.GoogleMapView' android:configChanges='orientation' android:screenOrientation='<%= @screenOrientation %>'/>
<activity android:name='com.rhomobile.rhodes.bluetooth.RhoBluetoothDeviceListActivity' android:configChanges='orientation' android:screenOrientation='<%= @screenOrientation %>'/>
2  platform/android/build/android.rake
@@ -237,6 +237,7 @@ namespace "config" do
$gapikey = nil if $gapikey.empty?
$android_orientation = $app_config["android"]["orientation"] unless $app_config["android"].nil?
+ $android_date_time_picker_dialog = $app_config["android"]["date_time_picker_dialog"] unless $app_config["android"].nil? || $app_config["android"]["date_time_picker_dialog"].nil?
$use_geomapping = $app_config["android"]["mapping"] unless $app_config["android"].nil?
$use_geomapping = $config["android"]["mapping"] if $use_geomapping.nil? and not $config["android"].nil?
@@ -1271,6 +1272,7 @@ namespace "build" do
generator.minSdkVer = $min_sdk_level
generator.maxSdkVer = $max_sdk_level
generator.screenOrientation = $android_orientation unless $android_orientation.nil?
+ generator.dateTimePickerDialog = $android_date_time_picker_dialog unless $android_date_time_picker_dialog.nil?
generator.usesLibraries[''] = true if $use_google_addon_api
generator.addGooglePush(File.join($androidpath,'Rhodes','PushReceiver.erb')) if $app_config["capabilities"].index 'push'
2  platform/android/build/manifest_generator.rb
@@ -15,6 +15,7 @@ class ManifestGenerator
attr_accessor :screenOrientation
attr_accessor :debuggable
attr_accessor :rhodesActivityIntentFilters
+ attr_accessor :dateTimePickerDialog
attr_accessor :manifestManifestAdds
attr_accessor :applicationManifestAdds
@@ -39,6 +40,7 @@ def initialize(javaPackage, appPackage, hidden, permissions, features = {})
@debuggable = 'false'
@manifestManifestAdds = []
@applicationManifestAdds = []
+ @dateTimePickerDialog = false
def addGoogleMaps
Something went wrong with that request. Please try again.