hi i am new to android i want to change my toolbar and text background color dynamically picking color using palette color picker from image ,any one please help me how to change my toolbar color i have multi images from json object how to change toolbar and text background from JSON,i want to change my toolbar color on every item when i click,plaese any one please help me how to got this HERE BELOW MY CODE
Meanswear.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);
}
Try this following
See this Example 1 Example 2