heres my code:
import apwidgets.*;
import android.text.InputType;
import android.view.inputmethod.EditorInfo;
APWidgetContainer widgetContainer;
APToggleButton toggleMusic;
APToggleButton toggleTheme;
APEditText nameField;
void initWidgets(){
widgetContainer = new APWidgetContainer(this); //create new container for widgets
toggleMusic = new APToggleButton(10, 200, 100, 70, "Music"); //create new toggle button from x- and y-pos. and label.
toggleTheme = new APToggleButton(10, 400, 100, 70, "Space");
nameField = new APEditText(20, 100, 150, 50); //create a textfield from x- and y-pos., width and height
widgetContainer.addWidget(toggleMusic); //place toggle button in container
widgetContainer.addWidget(nameField); //place textField in container
nameField.setImeOptions(EditorInfo.IME_ACTION_DONE);
// nameField.setImeOptions(EditorInfo.IME_ACTION_NEXT); i switch to this to see if itd work.
toggleMusic.setChecked(true); //toggle button is on from the beginning
}
void runWidgets(){
if(toggleMusic.isChecked()){ //if the toggle button is on
}
pushStyle();
fill(255);
text(nameField.getText(), screenWidth/1.5, screenHeight/5); //display the text in the text field
popStyle();
}
so ermm..... why isnt the done button working on the popup keyboard :P? has anyone else experienced this problem with APWidgets?
The other question I have is..... does anyone know how to make the buttons hidden?
lol im so failure with this library :D
http://www.jaboston.com
1