Android: Changing "Nextcloud" in Title Bar of the app to "Name of Server", assigned by the theming app

Created on 4 Sep 2016  路  19Comments  路  Source: nextcloud/android

I am using the nextcloud app V 1.2 and two different nextcloud server instances at this time.
I know i can the change the server instance by opening the left sidebar and selecting the right server instance from the drop down list. So far, so good! However, in the title bar of the app there is always the name Nextcloud visible, despite the fact, that I changed the Name of each server instance by the theming app.
To be able to distinguish between different server instances more visible, it would be highly appreciated, if the TITLE bar in the app would reflect the NAME of server instance, given in the theming app!
That means, changing the server instance with its own Name, causes the Name of the instance to be displayed in the TITLE Bar of the app as long, as i am connected to this server!

I hope, I got it right and clearly explained!

regards, hitam4450

enhancement pr exists

Most helpful comment

What do you think @jancborchardt @tobiasKaminsky ? I would vote to implement this (for Nc Server 11 and up)

All 19 comments

Hi @hitam4450 ,

understood :smiley:

@jancborchardt @nickvergessen @rullzer @LukasReschke is this information available via some kind of API, do we want to implement this (I think so, cc @tobiasKaminsky) and from which server version on (for compatibility handling) is this information available?

best regards,
Andy

Thanks!

What do you think @jancborchardt @tobiasKaminsky ? I would vote to implement this (for Nc Server 11 and up)

I don't know whether it's easy to implement or something, but we could also expose the theming colour somehow and you could then also use that?

Separation only by color could lead to mix-ups and misinterpretation.
The name of the connected server is much more robust and intuitive instead of selecting the "blue"
or the "red" sever!

Exposing name and color would be the "best" solution! :smile:

regards, hitam4450

@nickvergessen at the moment is is rather tricky to do theming based on the server side, since that means theming has to be done programmatically at runtime.
So if it is not too much effort to expose theming information (including the name) it would be great to have it even if it might just be for some client use in the future.
The thing I am thinking about is if this theming information should then be exposed via a dedicated service-url(s) to gather the color & name information and also the background image which could then be used in the drawer as requested by other users.

Only issue with theming that will still exist even in the near future is that icons are fixed so the folders will always be Nc blue. To change things like that we would have to do icon tinting (with caching) at runtime and manipulate the icons. Same applies to some extend to any color. We would then need to re-color any concerned UI element. I would check if the theme itself can be manipulated at runtime which would make things easier. So I would postpone color theming at the moment, btu like @hitam4450 said, having the server name fetched and displayed sounds like a very good idea. It help identifying to which server you are connected without having to open the drawer menu. :)

Only issue with theming that will still exist even in the near future is that icons are fixed so the folders will always be Nc blue.

That's also the case for the server atm, so no problem here I think.

Let me create an endpoint in the theming app then which has an entry in capabilities (so you can check if it exists), so you can get all theming informations from there.

HI, applying the theming color is not so important, I think than having the name of the connected server shown in the TITLE bar of the ANDROID client!
However, if a separate API is required, color adoption and others should be included!

I run NEXTCLOUD 9.0.51 as a stable environment and two 10.0 instances for trying, testing fiddling around!
Thats the reason, why I came up with this idea, since I always have to make sure to which server I am connected, by opening the left sidebar and check from the drop down list!

regards, hitam4450

It should be implemented for the desk top client as well, to be consistent !

regards, hitam4450

@AndyScherzinger we need to add to capabilities that theming endpoint exists. Now I wondered, why we don't just add all data their.
Currently I have those 4 values:

<?xml version="1.0"?>
<ocs>
 <meta>
  ...
 </meta>
 <data>
  ...
  <capabilities>
   ...
   <theming>
    <name>Nextcloud11 Testing</name>
    <url>https://nextcloud11.localhost</url>
    <slogan>Testing area for Nextcloud 11</slogan>
    <color>#44C3AA</color>
   </theming>
  </capabilities>
 </data>
</ocs>

But we could also just add it simple there, and put the actual data in a new url.

<?xml version="1.0"?>
<ocs>
 <meta>
  ...
 </meta>
 <data>
  ...
  <capabilities>
   ...
   <theming>
    <ocs-enpoint>v1</ocs-enpoint>
   </theming>
  </capabilities>
 </data>
</ocs>

Not sure what makes more sense atm

@AndyScherzinger sounds good. Both name and color would be cool indeed as identification by color works much faster. :)

following the discussion and the idea to adjust the color as well, why not completely adjust the client with the coloration of the connected server ? This include the left side panel as well! In this case the client looks the same way, as the sever theming!

regards, hitam4450

@jancborchardt @hitam4450 as stated before, see https://github.com/nextcloud/android/issues/240#issuecomment-244678523 and also before that (numerous times), dynamic theming isn't fun from an Android programmer perspective. It is rather a nightmare... So looking at this issue and it's original intent, let's focus the discussion on the server name, not any colors.

@nickvergessen whatever works better from a server point of view. :+1:

Ok, fine with me. At least I could distinguish between the different servers and can easily identify the one I am connected to!

regards, hitam4450

Merged for 9.0.54, 10.0.1 and 11
logo and background are 11+ only

Nice work @nickvergessen :)

This is done in #1031

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ikke-t picture ikke-t  路  3Comments

ThaDaVos picture ThaDaVos  路  3Comments

daywalk3r666 picture daywalk3r666  路  3Comments

Shagequi picture Shagequi  路  3Comments

ezaquarii picture ezaquarii  路  3Comments