Android EditText value to integer

后端 未结 1 831
别那么骄傲
别那么骄傲 2021-01-15 11:56

I am creating a mortgage calculator android program and I was trying to figure out how to get the EditText value (comes back as an Editable) to convert to an integer so I ca

相关标签:
1条回答
  • 2021-01-15 12:27
    Integer i = Integer.valueOf(String s);
    

    You should also configure the EditText to only accept integer values.

    0 讨论(0)
提交回复
热议问题