Android Calculator - Editview cannot input decimal places

前端 未结 4 1940
醉话见心
醉话见心 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:33

    You need to change the input type of your EditText in the XML code.

    Change the inputType attribute of the EditText from

    android:inputType="number"

    to

    android:inputType="numberDecimal"

    
    

提交回复
热议问题