Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 5 commits into
from
@@ -52,7 +52,13 @@
<activity android:name='com.rhomobile.rhodes.camera.FileList' android:configChanges='orientation' android:screenOrientation='<%= @screenOrientation %>'/>
<activity android:name='com.rhomobile.rhodes.camera.ImageCapture' 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 %>'/>
@@ -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['com.google.android.maps'] = true if $use_google_addon_api
generator.addGooglePush(File.join($androidpath,'Rhodes','PushReceiver.erb')) if $app_config["capabilities"].index 'push'
@@ -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
end
def addGoogleMaps