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

How to create an auto-upload Android picture app?
can we store our Sql lite database-phonegap android?
Adding TextView above ListView items to scroll along ListView Items
FC when trying an Intent of an ACTION_HEADSET_PLUG
Is there any way to connect printer from Android phones through wifi for printing?
Select an icon in a button android
How to stop one body when collide with another body [Box2d]
showDatePickerDialog can't load DatePicker Dialog
Permission issues while trying to compile native code
sherlock SearchView always collapsed
How to pass data between activities
Add a LinearLayout in bundle
Android start system service at app startup
add animation to listview items
Android Disable airplane mode at version >=4.1
Android: Adding many children to a layout in a separate thread

Categories

HOME
cobalt
cheerio
alexa-skills-kit
nunit
depth
numbers
shiro
gradient
can
vxml
spring-session
missing-data
retrofit2
boto3
computer-science
fabric.io
fhir
heap
endpoint
selenium-ide
selectize.js
symbol
capistrano3
entitymanager
powershell-v5.0
foreign-keys
shortest-path
gmm
question2answer
jquery-callback
draft-js-plugins
beautifier
custom-post-type
stackexchange
quantlib
gp
volatile
r-grid
spring-security4
pdw-file-browser
mnist
getlasterror
portforwarding
ssrs-2014
http-request
lampp
launchctl
mongotemplate
zenhub
edit
android-testing
quicktime
mach-o
structuremap4
javafx-css
testrail
visual-studio-2008-sp1
burrows-wheeler-transform
refinerycms
cassia
riot
nupic
avisynth
batik
finalbuilder
jdk1.7
pyobjc
dnssec
primitive-types
sip-server
administration
big-ip
codeplex
breakout
cocoalibspotify-2.0
flex++
stacky
argouml
onmousemove
patricia-trie
nokia-s40
fragmenttransaction
vfs
subproject
cgimage
creole
undefined-index
office-2007
spread
soappy
pnrp

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