Languages

Menu
Sites
Language
settings.xml and strings.xml for Samsung Gear app settings

Hi,

I am trying to use settings.xml for an application on Gear S to make it customizable from Gear Manager.

Actually it works. When I use static text in settings.xml it is fine.

However, if I use @ marks for texts to be converted from strings.xml, it doesn't convert. I mean I use the strings.xml file for that, but the final text is not formed from strings.xml.

Is there anything else to configure for this to work ?

A sample strings.xml is like:

<?xml version="1.0" encoding="utf-8"?>
<resource>
<string name="Clock_Name">Weather Clock</string>
<string name="24_Hour_Format">Use 24-hour format</string>
<string name="Hour_Format_Item1">1:00 PM</string>
<string name="Hour_Format_Item2">13:00 PM</string>
</resource>

For example, I use following line in my settings.xml:

<CheckBoxItem>@Hour_Format_Item1</CheckBoxItem>

But that line does not convert to "1:00 PM" as expected.

It shows up as "@Hour _Format_Item1"

What is required to convert using strings.xml ?

 

Thx.

Responses

5 Replies
AVSukhov

Hello,

Do you place your strings and settings xml in the same folder - "settings"?

mekabe remain

yes , absolutely.

both files in settings directory.

it seems like Gear Manager doesn't recognize the @ tags.

but why ?

mekabe remain

please , I need help.

what is it that I am doing wrong ?

 

Vikram

Hello,

In my memory, codes inside of this link could works fine. probably you can use these codes in your project.

 https://developer.tizen.org/forums/web-application-development/gear-can-you-explain-settings.xml-and-updatedsettings.xml

mekabe remain

my problem is about the strings.xml part. And I've checked it several times. It is similar to the one in the link posted by Vikram.

So , I don't understand why my strings on settings page show up with @ signs. What else can I try ?