Loading...
Logo
Processing Forum
speedi's Profile
1 Posts
1 Responses
0 Followers

Activity Trend

Last 30 days

Loading Chart...

Show:
Private Message
    Hi ppl,

    Im working on a project that is something like sending some text to a online database through android.

    Can someone help me out how to solve it ? Or how should i use a database here ?

    I have this until now:

    import apwidgets.*;
    import android.text.InputType;
    import android.view.inputmethod.EditorInfo;

    APWidgetContainer container;
    APEditText textField;

    String info = "";

    void setup() {
      container = new APWidgetContainer( this );

      textField = new APEditText( 40, 50, 400, 75 );
      container.addWidget( textField );
      textField.setInputType(InputType.TYPE_CLASS_TEXT); //Set the input type to text
      textField.setImeOptions(EditorInfo.IME_ACTION_NEXT); //Enables a next button, shifts to next field
      textField.setImeOptions(EditorInfo.IME_ACTION_DONE); //Enables a Done button
      textField.setCloseImeOnDone(true); //close the IME when done is pressed
      

    }

    void draw() {
      textSize(40);
      fill(0, 102, 153, 204);
      text(info, 25, 250); 
    }

    //If setImeOptions(EditorInfo.IME_ACTION_DONE) has been called 
    //on a APEditText. onClickWidget will be called when done editing.
    void onClickWidget(APWidget widget) {  
      if(widget == textField){ //
        info = textField.getText();
      }
    }



    Tks :p