Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Androidホームウィジェットでプログラミングを始めたばかりなので、ウィジェットプロバイダーからホームウィジェットのテキストビューにテキストを設定できましたが、そこからテキストを取得したい場合、理想がありません。findById() および getText() を使用できません。ウィジェットプロバイダーからホームウィジェットのテキストビューのテキストを取得する方法はありますか? または、別のアクティビティから取得する方法を教えてください。
彼女はサンプルコードです。
TextView textValue = (TextView) layout.findViewById(R.id.labelValue); String s = textValue.getText().toString(); textValue.setText("Welcome");