use the exchange using java. setText = "...", for class java there are many more methods for implementation.
//button fechar
btnclose.setEnabled(false);
btnclose.setText("FECHADO");
View.OnClickListener close = new View.OnClickListener() {
@Override
public void onClick(View view) {
if (btnclose.isClickable()) {
btnOpen.setEnabled(true);
btnOpen.setText("ABRIR");
btnclose.setEnabled(false);
btnclose.setText("FECHADO");
} else {
btnOpen.setEnabled(false);
btnOpen.setText("ABERTO");
btnclose.setEnabled(true);
btnclose.setText("FECHAR");
}
Toast.makeText(getActivity(), "FECHADO", Toast.LENGTH_SHORT).show();
}
};
btnclose.setOnClickListener(close);