我想为我的 ListView 创建一个 CustomItem,但我的字符串文本有问题。我尝试将带有字符“\n”的字符串用于换行。
我这样创建我的字符串:
String fullName ="First Name: ";
fullName.Append(firstName);//one string variable
fullName.Append("\n");
fullName.Append("Last Name: ");
fullName.Append(lastName);//one string variable
我希望 lastName 和 FirstName 出现在不同的行中。
我把这个字符串放在我的自定义项目中: pCitem->AddElement(Osp::Graphics::Rectangle(10,-30,430,150),index,fullName,35,Osp::Graphics::Color::COLOR_GREEN,Osp::图形::颜色::COLOR_RED,true);
(此处的 API:http: //developer.bada.com/help_2.0/index.jsp ?topic=/com.osp.cppapireference.help/classOsp_1_1Ui_1_1Controls_1_1CustomItem.html )。
我的问题是 firstName 和 lastName 没有出现在不同的行中。我该如何解决这个问题?谢谢