私は自分のプログラムの入力画面を準備し、そこに edittext と ImageViews を配置しました。問題は、仮想キーボードを使用して edittext 内にテキストを入力できることですが、問題は、テキストを使用した後、編集テキストから抜け出せず、カーソルは編集テキストボックスにのみ残ります。フォームを続行するためにクリックする必要がある imageView が下にありますが、その時点ではクリックできません。助けてください!!!
私のコードは
私のxml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ImageView
android:id="@+id/begin_"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="170dp"
android:layout_marginTop="220dp"
android:src="@drawable/begin" />
<ImageView
android:id="@+id/enter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="150dp"
android:layout_marginTop="30dp"
android:src="@drawable/enter_name" />
<ImageView
android:id="@+id/roof"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/roof" />
<EditText
android:id="@+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="180dp"
android:layout_marginTop="180dp"
android:ems="8"
android:inputType="textMultiLine"
android:imeOptions="actionDone"/>
</FrameLayout>
私のメインJavaクラス
package game.pack;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.*;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView;
public class Begin extends Activity implements View.OnClickListener {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.entry);
ImageView begin = (ImageView) findViewById(R.id.begin_);
begin.setOnClickListener(this);
}
public void onClick(View v) {
switch(v.getId()) {
case R.id.begin_:
setContentView(new SushiMain(this));
break;
default:
break;
}
}
}
私のアンドロイドマニフェストは
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="game.pack"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="15" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".FrontScreen"
android:screenOrientation="landscape"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Begin"
android:screenOrientation="landscape"
android:label="@string/app_name"
>
<intent-filter>
<action android:name="begingame" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".Sushitap"
android:screenOrientation="landscape"
android:label="@string/app_name" >
<intent-filter>
<action android:name="gameover" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>