Hi devs.
I have this method, and the textfield is drawn reddish, i tried several methods but nothing yet.
What am i doing wrong? I used 9Patch that comes in tool from android SDK.
public static TextField create9PatchTextField(String text) {
BitmapFont font = BitmapFontFactory.getLatin();
TextureAtlas.AtlasRegion region = AssetAccessor.getAtlas().findRegion("GAMEDATA/HUD/TEXTFIELD/TEXTFIELD", 9);
TextureRegion region2 = new TextureRegion(region);
NinePatch np = new NinePatch(region2);
np.setColor(Color.WHITE);
np.setPadLeft(30);
np.setPadRight(30);
NinePatchDrawable ninePatchDrawable = new NinePatchDrawable(np);
Color color = ninePatchDrawable.getPatch().getColor();
//ninePatchDrawable.getPatch().setColor(new Color().set(Color.CLEAR));
//ninePatchDrawable.getPatch().setColor(new Color().set(Color.WHITE));
//Prints FF0000FF
System.out.println("" + color);
TextField.TextFieldStyle textFieldStyle = new TextField.TextFieldStyle(font, Color.WHITE, null, null, ninePatchDrawable);
TextField textField = new TextField(text, textFieldStyle);
return textField;
}