简体   繁体   中英

How to set the android application logo and launcher icon programmatically

Would it be possible to set the logo and launcher icon dynamically rather than specifying in the manifest

<application
android:icon="@drawable/ic_launcher"
android:logo="@drawable/app_logo"
android:label="@string/app_name"
android:hardwareAccelerated="true">

Call setIcon() and setLogo() on ActionBar to change them at runtime.

EDIT: Works from API level 14 on.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM