ButterKnife @BindString equivalent in Android data binding

  android, android-databinding, butterknife

In my source code I have the following ButterKnife annotation:

public class MyActivity extends AppCompatActivity {

    @BindString(R2.string.settings_progress)
    String progressText;
    .
    .
    .
}  

Now I’ve decided to switch to Android Data Binding.

What would the equivalent be if I use Android data binding?

Should I declare a variable inside <data></data> tags in the activities XML file?

Source: Android Questions

LEAVE A COMMENT