Is it possible to set separate icons for application if we set android:debuggable=true in manifest and if we set android:debuggable=false like in iOS?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
You need gradle and build flavors to do this. Then you can have different resource folders for the different flavors.
http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Product-flavors
as far as i know app icons are only dependent on the drawables folder they are in, and there is no folder qualifiers for -debug and there's no way for you to alter the icon based on manifest changes
I'm a bit late the party, but anyway. At the moment I'm posting this in '16, you actually can have different launch icon set simply putting them to respective directories, not sure how it was back in '13 though. To achieve that you need to create debug/res directories under app/src and place your mipmap or drawable directories there. So you'll have app/src/main/res/ and app/src/debug/res/ paths. Android will have higher priority for build-related resource directory - to main directory. Place your debug and release resources to the appropriate paths and you'll have what you want. Do all of above considering you have to use Gradle build system.
Here you can read more about stuff like that: http://tools.android.com/tech-docs/new-build-system/resource-merging
You may try having two different app icons in your drawable folder - namely:
When setting debug mode to true:
Otherwise, when debug mode to false:
Whereas the response by Alex is fine in case flavors are not in use, for getting different icons while using different flavors with multiple dimensions, such as:
This can be achieved as:
First, put the debug resources in separate folders, such as:
Second, put the key with multiple flavor dimensions is that the sourceset name must contain all the possible flavor combinations, even if some of these dimensions do not affect the icon.
Just to make it clear, the following will not work when multiple dimensions are in use:
I know this is an old question - but if anyone else searches for this...
You can do this by creating a debug manifest (src/debug/AndroidManifest.xml) and updating its properties.
See: http://tools.android.com/tech-docs/new-build-system/user-guide/manifest-merger#TOC-Markers