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.
プレーンテキストが与えられた場合、その単語を「タグ付け」したいと思います。このタイプの UI を行うためのコンポーネントはありますか? たとえば、「Lorem ipsum dolor sit amet consectetur adipiscing elit」のようなテキストを取得し、次のようなビューを作成します。
私は少し検索しましたが、短くて簡単な実装を見つけることができませんでした。誰か提案がありますか?
前もって感謝します!
私自身の質問に答える: ViewGroup を作成し、カスタマイズされたボタンを配置することでこれを行っています。今のところ、それが最善かつ最も簡単な方法のように思えます。暫定的な擬似コードは次のとおりです。
View view = findViewById(someId); foreach (word in theText) { Button bt = new button(word); // a new button, with "word" as label view.addView(bt); }