Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-18040

Android: Expose "gravity" constants in Ti.UI.Notification

    Details

      Description

      I'd like to position an Android Toast (Ti.UI.Notification on the top half of the screen. I thought this wasn't possible, but then found that the first gravity argument for setGravity that I needed is actually exposed, just not documented.

      Using the integer value of the Android documentation for Gravity.TOP I was able to position the Toast on the top half of the screen:

      Ti.UI.createNotification({
          message: "Please Stand By",
          duration: Ti.UI.NOTIFICATION_DURATION_LONG,
          gravity: 48 // Gravity.TOP
      }).show();
      

      My request is:

      • Document the `gravity` property
      • Expose the gravity constants (Ti.UI.Android.GRAVITY_TOP etc..)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hknoechel Hans Knöchel
                Reporter:
                fokkezb Fokke Zandbergen
                Reviewer:
                Hans Knöchel
              • Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration