ボタンをクリックしてAndroid 4.1でモバイルネットワーク設定画面を起動しようとしています。ボタンをクリックすると、「アクティビティ クラスで onOKclicked(View) メソッドが見つかりませんでした」というメッセージが表示されます。私のコードは以下です。どんな助けでも大歓迎です!
public void onOKclicked (Intent intent){
startActivityForResult(new Intent(android.provider.Settings.ACTION_NETWORK_OPERATOR_SETTINGS), 0);
startActivity(intent);
}
<activity android:name="android.provider.Settings.ACTION_NETWORK_OPERATOR_SETTINGS"></activity>
<Button
android:id="@+id/btnOK"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="@string/OkButton"
android:onClick="onOKclicked" />