You won't be able to do that by sending a constant. If you want to change the text size of the TextView then you have to create a new layout or alter your existing one and then call showLayout() again. So if you are using an XML layout then you can either create a 2nd layout the same as the first but with a different font size for the TextView or if you are creating your TextView in the code then call setTextSize() on the TextView and then call showLayout().
Smartwatch 2 Control API change text size programatically
-
30-07-2022 - |
Question
I need to set the Font Size of a ViewText on the onCreate/onResume method..
I think it must be this way:
public void onResume() {
Bundle LayoutData = new Bundle();
LayoutData.putInt(Control.Intents.EXTRA_MENU_ITEM_ID, MENU_ITEM_1);
**(line missing)**
showLayout(R.layout.text_view, LayoutData);
....
}
I am missing this: I can''t find the option for EXTRA_FONT_SIZE, like the EXTRA_TEXT for the intent.
How can I do that?
Thanks!
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow