We always know set android:icon in Manifest can set icon and logo,
android:icon="drawable resource"
Can I set logo icon in Main Activity with Java code?
thanks for help
This answer could help you. Extract from mike yaworski's answer:
Summary:
android:icon="@drawable/ic_launcher"
determines your launcher icon, so just add images to the drawable folders and changeic_launcher
to whatever the name of image is that you want to be the icon.
android:label="@string/app_name"
determines your "label" so just look forapp_name
(because the label is referenced to@string/app_name
) in yourstrings.xml
file and change the contents of app_name.