I'm newbee in LibGdx world. I would like to create a stage, inside the stage, I would like to create two actor, one is TextField, one is a button. I want the TextField is able to support Chinese input, but I tried, the text field input has not reaction. Did I miss something? Can anyone take a look and let me know if there is any problem. Thanks a lot!
Here is my code:
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL10;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.InputListener;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.ImageButton;
import com.badlogic.gdx.scenes.scene2d.ui.TextField;
import com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldListener;
import com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldStyle;
import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable;
public class textFieldLanguageTest implements ApplicationListener {
    private Stage stage;
    private BitmapFont myFont;
    private TextFieldStyle textFieldStyle;
    private TextField textField;
    private ImageButton btn_add;
    TextureRegion btnu;
    TextureRegion btnd;
    TextureAtlas  atlas;
    @Override
    public void create() {      
        stage = new Stage(720, 480, false);
        myFont = new BitmapFont(Gdx.files.internal("data/myfont.fnt"),
                  Gdx.files.internal("data/myfont.png"), false);
        this.setButton();
        this.setTextInput();
        this.setListener();
        stage.addActor(btn_add);
        stage.addActor(textField);
        Gdx.input.setInputProcessor(stage);
    }
    public void setButton(){
        atlas = new TextureAtlas(Gdx.files.internal("data/test.pack"));
        btnu = atlas.findRegion("addbtnu");
        btnd = atlas.findRegion("addbtnd");
        TextureRegionDrawable Btn_UP = new TextureRegionDrawable(btnu);
        TextureRegionDrawable Btn_DOWN = new TextureRegionDrawable(btnd);
        btn_add = new ImageButton(Btn_UP, Btn_DOWN);
        btn_add.setPosition(200, 100);
        btn_add.setSize(100, 50);
    }
    public void setTextInput(){
        textFieldStyle = new TextFieldStyle();
        textFieldStyle.font = myFont;
        textFieldStyle.fontColor = Color.BLACK;
        textField = new TextField("Input here", textFieldStyle);
        textField.setPosition(100,  400);
        textField.setSize(200, 60);
        textField.setMaxLength(50);
    }
    public void setListener(){
        btn_add.addListener(new InputListener(){
            @Override
            public boolean touchDown(InputEvent event, float x, float y,
                    int pointer, int button) {
                // TODO Auto-generated method stub
                System.out.println("input text:" + textField.getText());
                return true;
            }
        });
        textField.setTextFieldListener(new TextFieldListener(){
            public void keyTyped (TextField textField, char key) {
                if (key == '\n') 
                    textField.getOnscreenKeyboard().show(false);
            }
        });
    }
    @Override
    public void dispose() {
    }
    @Override
    public void render() {      
        Gdx.gl.glClearColor(1, 1, 1, 1);
        Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
        stage.act();
        stage.draw();
    }
    @Override
    public void resize(int width, int height) {
    }
    @Override
    public void pause() {
    }
    @Override
    public void resume() {
    }
}