Open blissoft opened 12 years ago
I have troble making game with andengine. And the game root-activity is LayoutGameActivity.
in MainActivity.java
@Override public void onClick(ButtonSprite pButtonSprite, float pTouchAreaLocalX, float pTouchAreaLocalY) { // TODO Auto-generated method stub
if(pButtonSprite.equals(btn)) { this.runOnUiThread(new Runnable(){
@Override public void run() { // TODO Auto-generated method stub EditText edit_text=(EditText)findViewById(R.id.edit_text); edit_text.setVisibility(View.VISIBLE); }
});
} }
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent">
<org.andengine.opengl.view.RenderSurfaceView android:id="@+id/xmllayoutexample_rendersurfaceview" android:layout_width="fill_parent" android:layout_height="fill_parent"/>
<EditText android:id="@+id/edit_text" android:layout_width="fill_parent" android:gravity="bottom" android:layout_gravity="bottom" android:visibility="invisible" android:layout_height="wrap_content"/>
and as you know, I added the 'EditText' in main.xml .And in game, I want to EditText to visible.
But the edittext is not visible.Though the virtual-keyboard pop-up, the edittext is not visible.
And I attach the video of this problem.
www.youtube.com/watch?v=gj8FmEUBvaY
I have troble making game with andengine. And the game root-activity is LayoutGameActivity.
in MainActivity.java
@Override public void onClick(ButtonSprite pButtonSprite, float pTouchAreaLocalX, float pTouchAreaLocalY) { // TODO Auto-generated method stub
if(pButtonSprite.equals(btn)) { this.runOnUiThread(new Runnable(){
@Override public void run() { // TODO Auto-generated method stub EditText edit_text=(EditText)findViewById(R.id.edit_text); edit_text.setVisibility(View.VISIBLE); }
});
} }
in main.xml
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent">
<org.andengine.opengl.view.RenderSurfaceView android:id="@+id/xmllayoutexample_rendersurfaceview" android:layout_width="fill_parent" android:layout_height="fill_parent"/>
<EditText android:id="@+id/edit_text" android:layout_width="fill_parent" android:gravity="bottom" android:layout_gravity="bottom" android:visibility="invisible" android:layout_height="wrap_content"/>
and as you know, I added the 'EditText' in main.xml .And in game, I want to EditText to visible.
But the edittext is not visible.Though the virtual-keyboard pop-up, the edittext is not visible.
And I attach the video of this problem.
www.youtube.com/watch?v=gj8FmEUBvaY