• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Method no recognized

I want to declare a function. However, Android Studio interprets the function name as a variable. Indeed, it throws an error when the function is called upon further in the code ...

public final void showTotalPoints(){
textviewtpA.setText(String.valueOf(tpA));
textviewtpB.setText(String.valueOf(tpB));
}

buttonWinnerA.setOnClickListener(new View.OnClickListener() {
@override
public void onClick(View view) {
winnersA = changeScore(winnersA, entry.isChecked());
calculateValues();
buttonWinnerA.setText(getString(R.string.winnner) + " (" + String.valueOf(winnersA) + ")");
showTotalPoints();
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones