public class

DragLinearLayout

extends LinearLayoutCompat
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ androidx.appcompat.widget.LinearLayoutCompat
         ↳ com.sap.cloud.mobile.fiori.misc.interactive.DragLinearLayout

Class Overview

Drag linear layout has been taken from https://github.com/justasm/DragLinearLayout public repository from Github. The original repository is licensed under "The MIT License (MIT)'. This class has significant modifications to cope with specific requirements of Fiori SDK and to reflect the design guidelines. Below is the original license from the base URL.

The MIT License (MIT)

Copyright (c) 2014 Justas Medeisis

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Summary

[Expand]
Inherited Constants
From class androidx.appcompat.widget.LinearLayoutCompat
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
DragLinearLayout(Context context)
DragLinearLayout(Context context, AttributeSet attrs)
Public Methods
void addDragView(View child, View dragHandle)
boolean onInterceptTouchEvent(MotionEvent event)
boolean onTouchEvent(MotionEvent event)
void removeAllViews()
void removeDragView(View child)
void setContainerScrollView(ScrollView scrollView)
If this layout is within a ScrollView, register it here so that it can be scrolled during item drags.
void setOnViewSwapListener(OnViewSwapListener swapListener)
void setOrientation(int orientation)
void setScrollSensitiveHeight(int height)
Sets the height from upper / lower edge at which a container ScrollView, if one is registered via setContainerScrollView(ScrollView), is scrolled.
void startDragDetection(View child)
Activate the dragging process.
Protected Methods
void dispatchDraw(Canvas canvas)
[Expand]
Inherited Methods
From class androidx.appcompat.widget.LinearLayoutCompat
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource

Public Constructors

public DragLinearLayout (Context context)

public DragLinearLayout (Context context, AttributeSet attrs)

Public Methods

public void addDragView (View child, View dragHandle)

public boolean onInterceptTouchEvent (MotionEvent event)

public boolean onTouchEvent (MotionEvent event)

public void removeAllViews ()

public void removeDragView (View child)

public void setContainerScrollView (ScrollView scrollView)

If this layout is within a ScrollView, register it here so that it can be scrolled during item drags.

public void setOnViewSwapListener (OnViewSwapListener swapListener)

public void setOrientation (int orientation)

public void setScrollSensitiveHeight (int height)

Sets the height from upper / lower edge at which a container ScrollView, if one is registered via setContainerScrollView(ScrollView), is scrolled.

public void startDragDetection (View child)

Activate the dragging process.

Protected Methods

protected void dispatchDraw (Canvas canvas)