This question could be applied to many other cases.
In a android fragment class implemented with Kotlin, it’s common to see this using View Binding and SafeArgs:
class MyFragment: Fragment(){
var _binding: MyFragmentBinding? = null
val binding get() = _binding!!
val args: MyFragmentArgs by navArgs()
val data = args.data
[...]
Why are not private these properties? It’s not a bad pattern to expose my properties to another classes if it’s not needed?
Common where? Who’s code is this? Generally, yes, it’s better to encapsulate things and make them private, but this is an opinion-based question, so it can’t be answered suitably on this site.
Is the way proposed by android.developers guides developer.android.com/topic/libraries/… and developer.android.com/guide/navigation/use-graph/pass-data
Between those two links I only see one line of code with that anti pattern. It’s probably a mistake.