Open skgoetz opened 3 years ago
this solution is great (and it works) but maybe point out that you need to remove the
binding = FragmentFirstBinding.inflate(inflater, container, false); return binding.getRoot();
part that is loaded in there by default - as the app won't run with both pieces of code (the solution and the aforementioned code), it just throws errors saying 'code unreachable' or something.
This note is for steps 3 and 4, make the Count button update and cache the
TextView
.The Java code snippet that ends step 4 is out of date and doesn't work with Android Studio's current templates. Please update it to support view bindings.
Right now the tutorial says,
Instead, something like this: