嗨,我是 android 新手,我想更改我的工具栏和文本背景颜色,使用调色板颜色选择器从图像中动态选择颜色,请任何人帮助我如何更改我的工具栏颜色我有来自 json 对象的多个图像如何更改工具栏和文本来自 JSON 的背景,我想在单击时更改每个项目的工具栏颜色,请任何人帮助我如何在我的代码下方获得这个
手段磨损.java
int pos = 0;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_means_wear);
image = (ImageView)findViewById(R.id.imageView);
tv1 = (TextView)findViewById(R.id.textView2);
tv3 = (TextView)findViewById(R.id.textView3);
tv4 = (TextView)findViewById(R.id.textView6);
tv5 = (TextView)findViewById(R.id.textView5);
tex1 = (TextView)findViewById(R.id.textView1);
text2 = (TextView)findViewById(R.id.textView4);
btn = (Button)findViewById(R.id.button);
pos = Integer.parseInt((getIntent().getExtras()).getString("pos"));
tv1.setText(Women_clothing.gridData.get(pos).getDocumentName());
tv3.setText(Women_clothing.gridData.get(pos).getDocumentContent());
tv4.setText(Women_clothing.gridData.get(pos).getOffer());
tv5.setText(Women_clothing.gridData.get(pos).getAddress());
Picasso.with(getApplicationContext()).load((Women_clothing.gridData.get(pos)).getDocumentFile()).into(image);
}