How to change colour of Button? When I click "Equipment" button color will bi changed. And then when i clicked another button like "Technician" button Previous button("Equipment") colour set as default button color and "Technician" button color changed.
here is my code
public void onButtonTabClick(View v)
{
Fragment fragment = null;
switch (v.getId())
{
case R.id.button_equipment:
fragment = new EquipmentFragment();
break;
case R.id.button_tech:
fragment = new TechnicianFragment();
break;
case R.id.button_timeline:
fragment = new TimeLineFragment();
break;
}
FragmentManager manager = getSupportFragmentManager();
FragmentTransaction transaction = manager.beginTransaction();
transaction.replace(R.id.show_fragment, fragment);
transaction.commit();
}