I would like to include the UserName in the AppBar label / title area at the top of the layout. To my understanding res\values\strings.xml is a great place to put some constant values like the AppName. So I have
<resources>
<string name="app_name">MyFirstApp</string>...
In the manifest I have @string/app_name for the Label field.
So how do I go about getting the username added to the label?
I thought about creating a second string res constant named str_UserName. The value would be blank until authentication then programatically update str_UserName after succesful login. The trouble I have there is concatenating in the manifest. It doesn't like any combination I come up with. (for example @string/app_name + @string/str_UserName or @string/app_name + str_UserName etc.)
Then Googling I read up on string arrays. But in my attempts to use a string array it apears to not properly work for the manifest. I'm assuming because you can't just reference the array without and indexer for which element to display??
So in the end what I want is for the App Name to be left justified and preferrably use a constant value and the username be right justified and of course dynamic based upon the user.
TIA JB