android


Is it possible to have different label name of launcher activity & application name


I am simply making an demo application where I require to set different text for the label of launcher activity & application name.
When I set the launcher activity lable name to Login then it shows same application name. Is it possible to manually specify in the manifest application name.
This is how androidmanifest.xml looks but currently it is showing Login as application name also.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example" >
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".LoginActivity"
android:label="#string/login_screen_title" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
strings.xml
<string name="app_name">Demo</string>
<!-- login screens strings -->
<string name="login_screen_title">LOGIN</string>
Thanks in advance.
it's totaly possible to have the launcher activity label different from the application name, your code seem to be correct its weird that it doesn't work for you, try setting a label for the intent-filter
<intent-filter android:label="koko">
i quote below a paragraph from the android documentation which explain how labels are treated
In every case, the icon and label set in a containing element become
the default icon and label settings for all of the container's
subelements. Thus, the icon and label set in the element
are the default icon and label for each of the application's
components. Similarly, the icon and label set for a component — for
example, an element — are the default settings for each of
the component's elements. If an element
sets a label, but an activity and its intent filter do not, the
application label is treated as the label for both the activity and
the intent filter.
source http://developer.android.com/guide/topics/manifest/manifest-intro.html#iconlabel
Ah I saw accepted answer which #Mighter shared & it is working for me.
<activity
android:name=".LoginActivity"
android:label="#string/login_screen_title" >
<intent-filter android:label="#string/app_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

Related Links

Android BottomSheetBehavior, how to disable snap?
Glide + CollapsingToolbarLayout strange behavior
Using Async for a Network activity
My App shows popup recommending some App for which I did not write any code
How to align six imagebuttons in 2 columns with 3 rows in android studio?
Google Map Implementation in Viewpager, Error Unable to get provider com.google.firebase.provider.FirebaseInitProvider
set Hindi as TextToSpeech language in android programatically
How to make a link redirecting on Apple store or Google play
How to rotate image slowly in android?
Find element by class-name and content-desc in web context selenium
Retrofit - Failure in SSL library, usually a protocol error
Redirect site page on Intel XDK
How to implement own cast.receiver.media.Player
Titanium View.toImage() and base64 encode not always decoding properly
How does Firebase crash reporting initialize
AVD errors with HAX on Android Studio 2.1

Categories

HOME
asp.net-web-api
turing-machines
c++11
jmeter
formal-languages
flex
interface
camera
owl-carousel
google-schemas
windows-ce
cmdb
google-form
selenium-ide
onedrive-api
heat
smartclient
soci
digital-signature
solrcloud
springfox
ember-cli
roslyn
event-store
siri
stackexchange
android-maps
rpgle
cppreference
twiml
record
autolisp
android-sugarorm
instantiation
sendbird
carriage-return
python-import
pdw-file-browser
cd
z-notation
resolution
trigonometry
outputcache
strftime
snapchat
openresty
automapper-5
remedy
wpas
arules
pdf-conversion
lsyncd
py2neo
django-1.10
bootstrap-tags-input
android-instrumentation
javafx-css
cronexpression
node-request
burrows-wheeler-transform
cfchart
libav
ascii-art
sapi
decimalformat
rewrite
jdi
atoi
dronekit-android
sha512
apache-commons-daemon
uvc
phpldapadmin
procedural-programming
delayed-execution
post-commit-hook
punycode
formview
verold
functional-java
jjaql
ray
ios8-extension
dot42
qscrollarea
spring-3
gd-graph
asdf
workitem
merb
jquery-1.9
composite-component
onload-event
windows-98
idn
mkv
web-farm
veracity
oracle-enterprise-linux
fitbounds
screen-size
jquery-tools
lr
metaweblog
timertask
cruisecontrol.rb
silverlight-oob
lalr
sun

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App