Uploaded image for project: 'Documentation'
  1. Documentation
  2. TIDOC-1915

Alloy: ActionView supported as child of MenuItem

    Details

    • Story Points:
      5
    • Sprint:
      2014 Docs Sprint 21

      Description

      Alloy 1.6 will support defining an ActionView via XML markup. Note that you must set the showAsAction property to force the item onto the ActionBar or you'll get an empty "row" in your menu.

      See the sample app supplied with ALOY-1098 or refer to this code. If you include the collapsible_action_view flag as shown, tapping the item's icon will expand the view. You can then tap the "home as up" button to collapse that view.

      <Menu platform="android">
        <MenuItem showAsAction=Ti.Android.SHOW_AS_ACTION_IF_ROOM|Ti.Android.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW  icon=Ti.Android.R.drawable.ic_menu_search>
      	 <ActionView>
      		<TextField hintText="Use a SearchView"/>
      	 </ActionView>
        </MenuItem>
        <MenuItem showAsAction=Ti.Android.SHOW_AS_ACTION_IF_ROOM>
      	 <ActionView>
      		<Button title="Click"/>
      	 </ActionView>
        </MenuItem>
        <MenuItem title="Normal"/>
      </Menu>
      

      This is supported on Android 3.0+

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bhatfield Benjamin Hatfield (Inactive)
                Reporter:
                skypanther Tim Poulsen
                Reviewer:
                Tim Statler
              • Watchers:
                3 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