Just as @laalto said:
you're calling essentially setText(0) on your EditText. If you want to set the edittext value to 0, use setText(String) instead of setText(int).
But i assume it's not your fault because the value of int might be dynamic (called from a data source - DB), this was the case for me and i had to box the value of int i.e
instead of
setText(int)
use
setText(String.valueOf(int))
Hope this helps you Or someone! Happy Coding!!!