Languages

Menu
Sites
Language
App's background color and main theme background (specified using Styler)

I'm trying to make dialogs in my app look similar to dialogs of core (Samsung?) Tizen apps (Contacts, Calendar and so on). Thus, I'm using Genlist to build "forms".

However, items in my app have slightly different background (a shade of blue). This can be seen on the image:

My app to the left and core Settings app to the right.

How to make Genlist items use exactly the same background as core Tizen apps?

P.S. I'm testing this on Samsung Z1 (Tizen 2.4).

Edited by: Andriy Lesyuk on 04 Aug, 2018

Responses

9 Replies
K Johnson

To implement a genlist with custom background, you've to create a custom style with EDC according to your requirement and then set it first to a layout object. After that you've to set the genlist to that custom style layout.

Please go through Stopwatch sample app's source code from Tizen Studio samples list. You'll find source code which will fulfill your requirement.

Andriy Lesyuk

I do not need Genlist with a custom background. I need a Genlist with exactly the same background, which is used in the core Tizen apps!

I.e., I need my app (to the left) have exactly the same gradient background as the core Settings app (to the right).

Tizen allows to specify custom color for UI backgrounds. I need my app to use that custom color, which is specified in the system, too. How do I achieve that?

K Johnson

To meet your requirement you've to use Genlist with custom background because by default Tizen offers Genlist with the color as it is in left picture. Please go through the sample app I've mentioned in my previous reply. It'll provide you the same Genlist color as it is in right picture of your original post. Run that sample app. When it gets launched, press start button first and then keep pressing lap button. It'll create exactly same Genlist you're trying to implement. 

Andriy Lesyuk

I checked the Stopwatch sample: The background, which is used in this sample, is not the same as backgrounds in core apps:

First: the core Clock app after a shade of blue was chosen in Styler. Second: the core Clock app with the previous color in Style. Third: the Stopwatch sample.

In the sample Stopwatch the background is just explicitly set to grey (slightly darker than the system grey). And, that's not what I want.

What I want is: to make my app respect the color, which is chosen in Styler. So, if a user chooses, e.g., orange, the background of Genlist items becomes slightly orange too. I expected, that this should have been so "out of the box", actually...

I have also discovered, that backgrounds of the Naviframe title and buttons in my app are also not changed, when I change the color in Styler. So, the problem is not in Genlist. The problem is that the whole app does not respect the color, which is chosen in Styler. Is there any way to fix this?

Andriy Lesyuk

According to this:

https://developer.tizen.org/design/mobile/styles

This is somehow related to the "main theme background", which (seems like) is not correct in my app.

K Johnson
Would you please try to modify the source code of Stopwatch sample app according to your requirement and check whether it works or not? I guess, it's possible to implement with this source code.
Andriy Lesyuk

Sorry, I'm not sure, what do you want me to modify? I did try running the sample Stopwatch - it does not work as expected, the background is not changed when I change the color in Styler.

K Johnson

I meant about changing color values in edc code and check whether it meets your requirement or not. I'll try to test that sample app source code with several changes towards your requirement and get back to you soon with the points where changes can be made.

K Johnson

Hi Andriy Lesyuk,

According to my understanding, you may keep color choosing and changing facility for the users of your app inside the app only but you can't sync it with the color selected from styler. I couldn't find any way to do so.

However, I could change color of genlist items as below image. If you still want to implement this type of thing than I can share the process.

Thanks.