Skip to content

Conversation

@drauggres
Copy link

  1. added .clang-format style file and all sources are formatted using it (this is default style and now it is included in android module template)
  2. added classes BaseUIDialog and BaseDialogProxy. BaseUIDialog implements hide and release methods, so now we can call hide on proxy and dialog will be hidden.
  3. added missing properties from upsteam: minDate, maxDate, format24.
  4. cancel event is fired on dialog dismiss (we can catch back button)

P.S. Main goal of this changes is to have ability to hide dialog (which is not provided in SDK).

@dbankier
Copy link
Owner

dbankier commented Sep 7, 2018

Amazing. I will review this soon. Thank you very much.

@javamanrj
Copy link

This PR fixed a problem that I was having on 7.3.1 version of Titanium.
I had to fix a couple off things:

Change the TimePickerProxy.java#L78:
Before: picker = new TimePickerDialog(proxy.getActivity(), timeSetListener, hour, minute, is24HourView);
After: picker = new TimePickerDialog(TiApplication.getAppCurrentActivity(), timeSetListener, hour, minute, is24HourView);

Change the MultiPickerProxy.java:

  1. Before: builder = new AlertDialog.Builder(this.proxy.getActivity());
    After: builder = new AlertDialog.Builder(TiApplication.getAppCurrentActivity());

  2. Before: okButtonTitle = this.proxy.getActivity().getApplication().getResources().getString(R.string.ok);
    After: okButtonTitle = TiApplication.getAppCurrentActivity().getApplication().getResources().getString(R.string.ok);

  3. Before: cancelButtonTitle = this.proxy.getActivity().getApplication().getResources().getString(R.string.cancel);
    After: cancelButtonTitle = TiApplication.getAppCurrentActivity().getApplication().getResources().getString(R.string.cancel);

Had also to import the TiApplication on each file.

@drauggres
Copy link
Author

Thank you @javamanrj. I've updated PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants