文字列全体を整数に変換するときに問題が発生します。エディットテキスト「こんにちは」と入力し、ボタンを押してから他のエディットテキストに書き込むと、72 101 108108111と表示されます。私を助けてください...
私の.xmlファイル
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<EditText
android:id="@+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginRight="22dp"
android:layout_marginTop="20dp"
android:ems="10"
android:hint="@string/Message" >
<requestFocus />
</EditText>
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/editText1"
android:text="@string/Decimal" />
<EditText
android:id="@+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button1"
android:layout_marginTop="30dp"
android:ems="10"
android:hint="@string/Decimal"/>
</RelativeLayout>