B4A Library MaskedImageView v1.0.3

Discussion in 'Additional libraries, classes and official updates' started by DonManfred, Feb 27, 2015.

  1. DonManfred

    DonManfred Expert Licensed User

    MIV
    Version:
    1.03
    • MaskedImageView
      Methods:
      • AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int)
        programmatically add view to a panel or activity
      • Initialize (pkg As String, EventName As String, mask As String)
        Initialize the MaskImageView
        A mask you set here cannot be changed at runtime
      • IsInitialized As Boolean
      • getMask (width As Int, height As Int, name As String) As Bitmap
      Properties:
      • Drawable As Drawable [read only]
      • ImageBitmap As Bitmap [write only]
        Set the image to show Masked

    Code:
    Sub Globals
        
    'These global variables will be redeclared each time the activity is created.
        'These variables can only be accessed from this module.
        Dim miv1 As MaskedImageView
    End Sub
    [..]
        miv4.Initialize(
    Application.PackageName,"miv","shape_heart")
        miv1.AddToParent(
    Activity,125dip,125dip,100dip,100dip)
        miv1.ImageBitmap = bmp
    [​IMG]
     

    Attached Files:

  2. MhdBoy

    MhdBoy Member Licensed User

    good work
    thank you
     
  3. Troberg

    Troberg Well-Known Member Licensed User

    I haven't got an opportunity to test this yet, but, rest assured, I will.
     
  4. cambopad

    cambopad Active Member Licensed User

    Hi @DonManfred! Thanks for this library! I just tested it, and it works!

    However, I have one more question. Does it support click and touch event?
     
  5. ilan

    ilan Expert Licensed User

    Awesome, great job manfred :)
     
    DonManfred likes this.
  6. ilan

    ilan Expert Licensed User

    is it possible to creat our own shapes?? and i am missing a lib: Dim il As uil

    cant find that lib anywhere on anywhere software website :D
     
  7. ilan

    ilan Expert Licensed User

    found the answer, thanx :)
     
    Kwame Twum and DonManfred like this.
  8. DonManfred

    DonManfred Expert Licensed User

    UniversalImageLoader...
     
  9. ilan

    ilan Expert Licensed User

    one thing Is missing...
     
  10. DonManfred

    DonManfred Expert Licensed User

    skill? :D

    PS: Sorry, couln´t resist ;)
     
  11. ilan

    ilan Expert Licensed User

    donation button o_O
     
    DonManfred likes this.
  12. DonManfred

    DonManfred Expert Licensed User

    Use the one here. I will add it in this thread here later....

    PS: I like such "help requests" :D
     
  13. ilan

    ilan Expert Licensed User

    done :)

    if you know where I can find some "b4a skills" just let me know :D
     
    DonManfred likes this.
  14. DonManfred

    DonManfred Expert Licensed User

    Thank you very much ilan! :)

    :D
     
  15. Kwame Twum

    Kwame Twum Active Member Licensed User

    Hello @DonManfred and all, Please I'm finding it difficult working with my own .svgs... I created a couple of them but they don't work. I've attached a new one I created with Adobe Illustrator.
    Could anyone guide me on how to create one or upload a similar one for me?

    I also tried modifying the ones in the res folder, but when I do, they don't show in the app
    NB. I'm running the downloaded sample.

    My modified code:
    Code:
    miv2.Initialize(Application.PackageName,"miv","hex")  'hex is the name of the .svg file I created
    miv2.AddToParent(Activity,150dip,0dip,100dip,100dip)
    miv2.ImageBitmap = bmp
    2nd_image_not showing.jpg
     

    Attached Files:

    • hex.zip
      File size:
      697 bytes
      Views:
      8
    Last edited: Jan 16, 2016
  16. Kwame Twum

    Kwame Twum Active Member Licensed User

    DonManfred likes this.
  17. DonManfred

    DonManfred Expert Licensed User

    Can you post the working svg file?
     
  18. Kwame Twum

    Kwame Twum Active Member Licensed User

    Here you go:
     

    Attached Files:

    DonManfred and lemonisdead like this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice