答案 0 :(得分:0)
请使用此项并设置所需的颜色。
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
inflater.inflate(R.menu.your_menu, menu);
int positionOfMenuItem = 0; // or whatever...
MenuItem item = menu.getItem(positionOfMenuItem);
SpannableString s = new SpannableString("My MenuItem");
s.setSpan(new ForegroundColorSpan(Color.RED), 0, s.length(), 0);
item.setTitle(s);
}
答案 1 :(得分:0)
请检查How to change the background color of Action Bar's Option Menu in Android 4.2?
和更改文字颜色:设置“android:textColor”将起作用
var baseAddress = string.Format("http://localhost:+:9000/");