所以这张图片基本上展示了我想做的事情:
我想在已经有文本的按钮上添加静态文本(橙色 A)。但我不知道怎么做。
最佳答案
你可以试试 Html.fromHTML(htmlString) .像这样的东西:
myTextButton.setText(Html.fromHtml("<font color='#FFA500'>A: </font> whatever text you need here"));
关于android - 如何在android中的一个按钮中放置2个不同的文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17166077/