I'm trying to learn mvvm with a simple project but BR not working for me. I import com.example.mvvm.BR to my class but android studio show me cannot resolve symbol BR.
public class UserViewModel extends BaseObservable
{
private String name;
private Context context;
public UserViewModel(User user)
{
this.name = name;
}
public UserViewModel(Context context)
{
this.context = context;
}
@Bindable
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
notifyPropertyChanged(BR.name);//error
}
}
What should I do?