navasmdc / MaterialDesignLibrary

This is a library with components of Android L to you use in android 2.2
Apache License 2.0
8.99k stars 2.23k forks source link

ButtonFlat.setText("test") - cannot resolve method setText #327

Open ghost opened 9 years ago

ghost commented 9 years ago

Hi. I want to change the text in a FlatButton but Android Studio says "Cannot resolve method 'setText(java.lang.string)'".

My Code:

import com.gc.materialdesign.views.Button;
//...
Button btnRecord = (Button)findViewById(R.id.btnRecord);
btnRecord.setText("test");

How can I change the text of the button?

robbStarkTFG4 commented 9 years ago

change it in your xml file.

ghost commented 9 years ago

I have to change the text programmatically...

dzaen commented 8 years ago

import android.widget.Button;