Android Calculator - Editview cannot input decimal places

前端 未结 4 1934
醉话见心
醉话见心 2021-01-24 10:56

I am new to Android code development...I am developing a Android calculator apps and does not understand why the two EditTexts (first input and second input) cannot accept decim

4条回答
  •  北海茫月
    2021-01-24 11:35

    inputType="number" doesnt allow floats. try changing:

    android:inputType="number"
    

    to:

    android:numeric="integer|decimal"
    

提交回复
热议问题