[TIMOB-11646] Android: Allow 'show' and 'hide' functionality of the action bar
| GitHub Issue | n/a |
|---|---|
| Type | Sub-task |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2012-11-13T22:06:18.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Android |
| Labels | actionbar, qe-testadded |
| Reporter | Allen Yeung |
| Assignee | Allen Yeung |
| Created | 2012-11-02T00:38:04.000+0000 |
| Updated | 2014-06-19T12:43:35.000+0000 |
Description
We could possibly tie this in with the navbarhidden property on windows.
Specifying navbarhidden already hides the action bar, so no work needs to be done here. Will add a hide/show method on the action bar proxy itself instead.
Test case: 1. Set your target sdk version to 14 by adding the entry if your tiapp.xml"
2. Run the following code:<android xmlns:android="http://schemas.android.com/apk/res/android"> <manifest> <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="14"/> </manifest> </android>3. Click on the hide button 4. Click on the show button Expect result: You should see the action bar hide and show accordingly when you push the two buttons.var win = Ti.UI.createWindow({ fullscreen : true, backgroundColor : 'black', layout: 'vertical' }); var show = Ti.UI.createButton({ title: 'show' }); var hide = Ti.UI.createButton({ title: 'hide' }); show.addEventListener('click', function() { var actionBar = win.activity.actionBar; actionBar.show(); }) hide.addEventListener('click', function() { var actionBar = win.activity.actionBar; actionBar.hide(); }); win.add(show); win.add(hide); win.open();Hide and Show properties of actionBar is working fine as expected. Hence closing it. Verified on: Device : Google Nexus 7, Android Version: 4.1 SDK version: 3.1.0.v20130320190115 CLI version : 3.0.24 OS : MAC OSX 10.7.5 XCode : 4.5.1