4

I just begin programming with android home widget, so i could set text to a textview in home widget from my widget provider but when i want to get text from it, i have no ideal. Can not findById() and getText(). Is there any way to get text of textview in home widget from widget provider? Or show me how to get from another activity?

Kiradev
  • 347
  • 2
  • 17

1 Answers1

0

Her is sample code.

TextView textValue = (TextView) layout.findViewById(R.id.labelValue);
String s = textValue.getText().toString();
textValue.setText("Welcome");
Bala
  • 445
  • 5
  • 11
  • 26
  • 3
    OMG, Please read my question again. I can not findViewById in widget provider. this is first time i programming with widget, and i discover that can not findViewById, so i get stuck when get TextView and get text. – Kiradev Jun 27 '12 at 12:21
  • widgets use remote views, they don't have find by id method – Alireza Jamali Jul 08 '22 at 17:45