[TIMOB-11648] Android: Allow changing the app icon/ app logo on the action bar
| GitHub Issue | n/a |
|---|---|
| Type | Sub-task |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2012-11-13T22:06:44.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:41:31.000+0000 |
| Updated | 2014-06-19T12:42:39.000+0000 |
Description
There should be a setIcon or setLogo method on the native android action bar. We should be able to map these accordingly.
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>Expect result: You should see the image as the logo for the action bar NOTE: This needs to be tested on a device with ICS and abovevar win = Ti.UI.createWindow({ fullscreen : true, backgroundColor : 'black' }); win.addEventListener('open', function() { var actionBar = win.activity.actionBar; actionBar.setLogo('KS_nav_ui.png'); }); win.open();setLogo functionality sets the app icon on the actionBar 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
This item should not be considered complete before adding functionality to switch between icon and logo display on the action bar. [This API should be exposed](http://developer.android.com/reference/android/app/ActionBar.html#setDisplayUseLogoEnabled(boolean))