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.
如前所述,我如何组合来自每个来源的值,例如我想更改标题栏值...
page.setTitle(R.id.pagetitle)
结合...
page.setTitle("a text")
为了输出...
"R.id.pagetitle: a text" (note the " : ")
Java 中使用什么来连接这些值,例如PHP中的“ . ”或JavaScript中的“ + ” ?
您可以使用 String.Format
String myString = String.Format("%s: a title", getText(R.id.pagetitle));
它非常简单。
String titleText = firstText.concat("a text"); page.setTitle(titleText);
希望能帮助到你。