This plugin produces a grid, or strip of scrollable square buttons. Buttons images can be added to the Xcode
or Android project or they can be downloaded from a URL. Advanced settings allow you to control the
screens layout and behavior.
The button items can be individually entered in the control panel or they
may come from a remote file. If you're showing more than a dozen or so buttons it's
usually best to pull them from a remote file.
iOS Project
------------------------
2 Objective-C classes (a total of 4 files) are needed.
BT_screen_menuButtons.m and .h
BT_button_view.m and .h
BT_screen_menuButtons.m is the main UIViewController that shows the buttons.
The screen uses an iOS UIScrollViewController to manage button scrolling.
Each button is an instance of the BT_button_view.h, .m class.
Android Project
------------------------
BT_screen_menuListButtons.java is the Activity class that displays the buttons. The layout is handled by
screen_menubuttons.xml for the activity. Each button is represented in the menu_buttons_item.xml file.
The screen uses an Android ScrollView to manage button scrolling.
Version History
-----------------
v1.9 4/27/2014 (chris1)
More fixes related to buttons being pushed off the screen. Thanks to Niraj for assistance.
v1.8 4/26/2014 (chris1)
Fixed issue with buttons being pushed off screen on iOS7 apps in certain circumstances.
v1.7 2/1/2014 (chris1)
Fixed issue with button image missing on iOS devices.
v1.6 1/24/2014 (chris1)
Fixed issues with opacity settings on both iOS and Android. Updated for 3.0 control panels.
v1.3 11/10/2012
Minor syntax changes to accomodate for Xcode 4.5 compiler warnings.
Minor changes in .java files to accomodate for Anroid (Google) 2.2 API's compiler warnings.
Minor UI changes in .php files for control panel.
v1.0, 1.1, 1.2 (historical versions, no change details)
JSON Data
------------------------
If you manually enter the screen data, the JSON data for this item in the BT_config.txt
includes a child items array holding individual BT_items. Each item represents a button.
{
"itemId":"1111",
"itemType":"BT_screen_menuButtons",
"navBarTitleText":"My Button Menu",
"childItems":[
{
"itemId":"menu_1",
"itemType":"BT_buttonItem",
"imageNameSmallDevice":"iPhoneButton1.png",
"imageNameLargeDevice":"iPadButton1.png",
"loadScreenWithItemId":"1234"
},
{
"itemId":"menu_2",
"itemType":"BT_buttonItem",
"imageNameSmallDevice":"iPhoneButton2.png",
"imageNameLargeDevice":"iPadButton2.png",
"loadScreenWithItemId":"5678"
}
]
}
If you provide screen data from a remote file there is no childItems array in the screen
definition in the BT_config.txt file. Instead, the button items are pulled from a remote file.
{
"itemId":"1111",
"itemType":"BT_screen_menuButtons",
"navBarTitleText":"My Button Menu",
"dataURL":"
http://www.domain.com/theMenuButtonsData.php"
}
In this case the menu items would come from a backend script at the dataURL. Loading
the dataURL in your browser would produce output like this....
{
"childItems":[
{
"itemId":"menu_1",
"itemType":"BT_buttonItem",
"imageNameSmallDevice":"iPhoneButton2.png",
"imageNameLargeDevice":"iPadButton2.png",
"loadScreenWithItemId":"1234"
},
{
"itemId":"menu_2",
"itemType":"BT_buttonItem",
"imageNameSmallDevice":"iPhoneButton2.png",
"imageNameLargeDevice":"iPadButton2.png",
"loadScreenWithItemId":"5678"
},
{
"itemId":"menu_3",
"itemType":"BT_buttonItem",
"imageNameSmallDevice":"iPhoneButton2.png",
"imageNameLargeDevice":"iPadButton2.png",
"loadScreenWithItemId":"2948"
}
]
}