0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

processing(android mode)で日本語入力(widgetのEditText使用)

Last updated at Posted at 2018-09-20

二日かかった割に単純なコード…
Fragment勉強した時間返してくれ


import android.view.*;
import android.widget.*;
import android.support.v4.app.*;
void setup() {
  runOnUiThread(new Runnable() {
    public void run() {
      FrameLayout fl=new FrameLayout(getContext());
      EditText et=new EditText(getContext());
      et.setBackgroundColor(color(255));
      FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(500, 200);
      lp.topMargin = height/2;
      lp.leftMargin = width/2;
      View surfaceView=getSurface().getSurfaceView();
      ViewGroup parent=(ViewGroup)surfaceView.getParent();
      parent.removeView(surfaceView);
      parent.addView(fl);
      fl.addView(surfaceView);
      fl.addView(et,lp);
    }
  }
  );
}
void draw(){
  background(255,0,0);
}

Screenshot_2018-09-20-22-54-07.png
javaモードならこちら

processing3でAWT/swingを使う。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?