私は、3つのラジオボタンがあるアクティビティを実行するアプリケーションを開発しています。これは私の.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_centerHorizontal="true"
android:layout_marginTop="32dp"
android:hint="@string/hint"
android:ems="10" />
<RadioGroup
android:id="@+id/radioGroup"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_marginTop="200dp"
android:layout_marginLeft="30dp"
android:gravity="center" >
<RadioButton
android:id="@+id/rad1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="@string/rad1" />
<RadioButton
android:id="@+id/rad2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:text="@string/rad2" />
<RadioButton
android:id="@+id/rad3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/rad3"
android:layout_marginLeft="8dp" />
</RadioGroup>
</RelativeLayout>
edittextの入力をText、Hexadecimal、Decimal形式に変換したい。デフォルトでは、テキスト値です。ユーザーが16進数のラジオボタンを選択すると、テキストは16進数に変換されます。その後、ユーザーが10進数を選択すると、16進数を10進数に変換する必要があります...私の問題は、ユーザーが1つの形式で入力したときに、他の2つの形式に変換できる方法です。変換のロジックがあります...助けてください私...ありがとう...