Resources resources=getBaseContext().getResources(); int color=resources.getColor(R.color.colorAccent); String string=resources.getString(R.string.helloWorld); TextView textView= (TextView) findViewById(R.id.textView); textView.setBackgroundColor(color); textView.setText(string);
时间: 2024-10-06 03:38:21