@Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(new MyView(this));

    mPaint = new Paint();
    mPaint.setAntiAlias(true);
    mPaint.setDither(true);
    mPaint.setColor(0xFFFF0000);
    mPaint.setStyle(Paint.Style.STROKE);
    mPaint.setStrokeJoin(Paint.Join.ROUND);
    mPaint.setStrokeCap(Paint.Cap.ROUND);
    mPaint.setStrokeWidth(40);

    mEmboss = new EmbossMaskFilter(new float[] {0, 12, 0}, 0.8f, 10, 20f);

    mBlur = new BlurMaskFilter(8, BlurMaskFilter.Blur.NORMAL);
  }
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
    super.onCreateOptionsMenu(menu);

    menu.add(0, COLOR_MENU_ID, 0, "Color").setShortcut('3', 'c');
    menu.add(0, EMBOSS_MENU_ID, 0, "Emboss").setShortcut('4', 's');
    menu.add(0, BLUR_MENU_ID, 0, "Blur").setShortcut('5', 'z');
    menu.add(0, ERASE_MENU_ID, 0, "Erase").setShortcut('5', 'z');
    menu.add(0, SRCATOP_MENU_ID, 0, "SrcATop").setShortcut('5', 'z');

    /**
     * ** Is this the mechanism to extend with filter effects? Intent intent = new Intent(null,
     * getIntent().getData()); intent.addCategory(Intent.CATEGORY_ALTERNATIVE);
     * menu.addIntentOptions( Menu.ALTERNATIVE, 0, new ComponentName(this, NotesList.class), null,
     * intent, 0, null); ***
     */
    return true;
  }
Beispiel #3
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(new SampleView(this));
 }
 @Override
 public boolean onPrepareOptionsMenu(Menu menu) {
   super.onPrepareOptionsMenu(menu);
   return true;
 }