I'm new to android programming. I encountered a problem and I'm having a hard time applying the solution given in this topic: How to format the input of EditText when typing with thousands separators (,) in Android?
so far I have made a seperate Java file and pasted the main code in it but I can't find out how to "add editText.addTextChangedListener(new NumberTextWatcher(editText)); to my EditText component". my XML EditText looks like this:
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number"
android:id="@+id/editText"
android:layout_weight="1"
/>