1. Download our Official Android App: Forums for Android!

Apps How to draw on a picture imageview the moment I click on a FloatingActionButton?

Discussion in 'Android Development' started by imso, Sep 10, 2016.

  1. imso

    imso Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    56
    Joined:
    Mar 8, 2011

    Mar 8, 2011
    56
    0
    15
    Hi rather new to android development, as what was stated on the header I wanted a "paint" or "eraser" function to remove/censor unwanted parts on a photo displayed on a imageview for the user to edit and a redo function if user makes a mistake while editing?

    How do I come about doing it, I've read relevant topics on Canvas, or FingerPaint API but still puzzled on how to implement it based on my scenario? Thanks for any helped rendered!

    Code (Text):
    1. idImage = (ImageView)findViewById(R.id.idImage);
    2.             FloatingActionButton CensorButton = (FloatingActionButton) findViewById(R.id.fab);
    3.  
    4.                     CensorButton.setOnClickListener(new View.OnClickListener() {
    5.                         @Override
    6.                         public void onClick(View view) {
    7.             //????
    8.                         }
     

    Advertisement

    #1 imso, Sep 10, 2016
    Last edited: Dec 30, 2016
  2. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #11
    Points:
    1,988
    Posts:
    7,866
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    7,866
    11,495
    1,988
    Male
    Software developer
    South West of England
  3. imso

    imso Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    56
    Joined:
    Mar 8, 2011

    Mar 8, 2011
    56
    0
    15
    Thanks for the reply undo/redo feature I can implement later, but the thing now is I have rather little idea on how to implement the fingerpaint feature to censor/cover part of a chosen image using a floatingactionButton? Could you help on that?
     
  4. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #11
    Points:
    1,988
    Posts:
    7,866
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    7,866
    11,495
    1,988
    Male
    Software developer
    South West of England
    What you are asking for I think is an image editor. Not done anything like this myself, but it sounds a bit more tricky than simply drawing and erasing stuff on a Canvas.
    I found this image editing SDK for Android, don't know if this is any help?

    https://developers.aviary.com/docs/android
     
    imso and El Presidente like this.
  5. imso

    imso Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    56
    Joined:
    Mar 8, 2011

    Mar 8, 2011
    56
    0
    15
    Hi thanks for your help and recommendation appreciate greatly but it seems over the top for a simple function I'm requesting?
     
  6. imso

    imso Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    56
    Joined:
    Mar 8, 2011

    Mar 8, 2011
    56
    0
    15
  7. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #11
    Points:
    1,988
    Posts:
    7,866
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    7,866
    11,495
    1,988
    Male
    Software developer
    South West of England
    Nobody answered because realistically, nobody is going to download your entire app, load it into Studio, and debug it for you. This is grunt work, and people already have enough of their own grunt work to do.
    I recommend that you become familiar with the debugging facilities built into Android Studio, and learn to debug your code. Sorry if this sounds harsh, but if you want to be an effective developer, you have to get familiar with this. Think of it as a voyage of discovery, and you may actually learn something along the way ;)
     
  8. imso

    imso Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    56
    Joined:
    Mar 8, 2011

    Mar 8, 2011
    56
    0
    15
    Haha its ok the problem is that I've tried debugging it for more than a week on the stated problems with no progress in sight before resorting to come here and ask.
     
  9. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #11
    Points:
    1,988
    Posts:
    7,866
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    7,866
    11,495
    1,988
    Male
    Software developer
    South West of England
    Well full marks for trying. You say one of the problems is your app crashes. Do you have a stack trace for that, with associated code fragment? Could probably help you out with that.
     
  10. imso

    imso Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    56
    Joined:
    Mar 8, 2011

    Mar 8, 2011
    56
    0
    15
    Appreciate your offer of help, sorry for my extremely late reply due to family matter was not able to visit this forum and work on my android project. About that crash that I've experience it has been resolve thanks for your concern!
     
    #10 imso, Oct 3, 2016
    Last edited: Dec 30, 2016

Share This Page

Loading...