B4A Library SplitImageView

Discussion in 'Additional libraries, classes and official updates' started by Johan Schoeman, Jul 26, 2015.

Similar threads

B4A Tutorial [java] Custom View with Designer Support (Java library)
B4A Library PanoramaImageView
B4A Library CircleProgressMaster
B4A Library SnakeView
B4A Library LEDView
B4A Library AnimatedCheckbox V1.0.1
  1. Johan Schoeman

    Johan Schoeman Expert Licensed User

    The attached project wraps this Github project. The library files are in the /files folder of the B4A project. Copy them to your additional library folder. You will also need to download the images that are used in the B4A project from here (they are too big to zip along with the B4A project). Copy them into the /files folder of the B4A project once you have downloaded and unzipped it.

    The pic on the right is set to "auto unveil". The pic on the left is set to "manual unveil". Drag your finger from top right to bottom left or bottom left to top right to unveil more/less of the background image of the pic on the left.

    Also posting the Java source code.

    1.png


    splitimageview
    Author:
    Johan Schoeman
    Version: 1
    • SplitImageView
      Fields:
      • ba As BA
      Methods:
      • BringToFront
      • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
      • Initialize (EventName As String)
      • Invalidate
      • Invalidate2 (arg0 As Rect)
      • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
      • IsInitialized As Boolean
      • RemoveView
      • RequestFocus As Boolean
      • SendToBack
      • SetBackgroundImage (arg0 As Bitmap)
      • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
      • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
      • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
      • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
      • clearColorFilter
      • isEnableAutomaticAnimation As Boolean
      Properties:
      • AutomaticAnimationDuration As Int
        Set the duration of the automatic animation.
        If the automatic animation has already started this wont take effect.
        Call this before calling setEnableAutomaticAnimation
      • Background As Drawable
      • BackgroundImageBitmap As Bitmap [write only]
        Sets a Bitmap as the background content of this SplitImageView.
      • BackgroundImageDrawable As Drawable [write only]
        Sets a Bitmap as the background content of this SplitImageView.
      • Color As Int [write only]
      • ColorFilter As Int [write only]
      • EnableAutomaticAnimation As Boolean [write only]
        Will enable automatic animation. For this to work the foreground drawable and background
        drawable will have to be set. Also when enabled touch unveil will not work.
      • Enabled As Boolean
      • ForegroundImageBitmap As Bitmap [write only]
        Sets a Bitmap as the foreground content of this SplitImageView.
      • ForegroundImageDrawable As Drawable [write only]
        Sets a Bitmap as the foreground content of this SplitImageView.
      • Height As Int
      • ImageAlpha As Int
        Returns the alpha that will be applied to the drawables of this SplitImageView.
      • Left As Int
      • SplitPercent As Int [write only]
        This method will set the percentage of split that is applied to the Images.
        Lesser the value more the amount that is reveled.
        By default this is 50%.
      • Tag As Object
      • Top As Int
      • UnveilOnTouch As Boolean [write only]
        Enables the touch to unveil feature
      • Visible As Boolean
      • Width As Int
     

    Attached Files:

    Isac, ArminKH, Erel and 5 others like this.
  2. DonManfred

    DonManfred Expert Licensed User

    You are missing the images in the example
     
  3. Johan Schoeman

    Johan Schoeman Expert Licensed User

    See the post above @DonManfred. You need to download them from the Dropbox link that I have posted. Here it is again - here
     
    DonManfred likes this.
  4. DonManfred

    DonManfred Expert Licensed User

Loading...