DragLinearLayout alternatives and similar packages
Based on the "Layout Widget" category.
Alternatively, view DragLinearLayout alternatives based on common mentions on social networks and blogs.
-
SmartRefreshLayout
🔥下拉刷新、上拉加载、二级刷新、淘宝二楼、RefreshLayout、OverScroll,Android智能下拉刷新框架,支持越界回弹、越界拖动,具有极强的扩展性,集成了几十种炫酷的Header和 Footer。 -
AndroidSwipeLayout
The Most Powerful Swipe Layout! -
ResideLayout
iOS 7/8 style side menu with parallax effect. -
SmartTabLayout
A custom ViewPager title strip which gives continuous feedback to the user when scrolling -
SwipeBackLayout
An Android library that help you to build app with swipe back gesture. -
FoldingCell
:octocat: 📃 FoldingCell is a material design expanding content cell inspired by folding paper material made by @Ramotion -
FreeFlow
A layout engine for Android that decouples layouts from the View containers that manage scrolling and view recycling. FreeFlow makes it really easy to create custom layouts and beautiful transition animations as data and layouts change -
android-PullRefreshLayout
This component like SwipeRefreshLayout, it is more beautiful than SwipeRefreshLayout. -
android-flowlayout
Linear layout, that wrap its content to the next line if there is no space in the current line. -
FoldableLayout
Android widgets to implement folding animation -
ExpandableLayout
Implementation of ExpandableListview with custom header and custom content. -
smooth-app-bar-layout
Smooth version of Google Support Design AppBarLayout -
SwipeRevealLayout
Easy, flexible and powerful Swipe Layout for Android -
SuperSwipeRefreshLayout
A custom SwipeRefreshLayout to support the pull-to-refresh featrue.RecyclerView,ListView,GridView,NestedScrollView,ScrollView are supported. -
DragTopLayout
DEPRECATED, Please use another library https://github.com/henrytao-me/smooth-app-bar-layout/ -
DragLayout
An Android Project.强迫症头像制作器,使用support.v4包下的ViewDragHelper实现QQ5.0侧滑 -
SmoothRefreshLayout
一款支持上下拉刷新、越界回弹、二级刷新、横向刷新、拉伸回弹、平滑滚动、嵌套滚动的多功能刷新控件 -
Search-View-Layout
Material Design Search View Layout, now implemented in Google Maps, Dialer, etc -
Vorolay
VoronoiView is a view (ViewGroup) that allows you to add and display views inside Voronoi diagram regions. -
FlowLayout
Android implementation of FlowLayout. Layout arranges its children in multiple rows depending on their width. -
CursorWheelLayout
An Android Widget for selecting items that rotate on a wheel. -
android_maskable_layout
A library that easily allows you to mask layouts/viewgroups -
android-empty-layout
A library for showing different types of layouts when a list view is empty -
PhysicsLayout
Android layout that simulates physics using JBox2D -
JellyRefreshLayout
A pull-down-to-refresh layout inspired by Lollipop overscrolled effects -
NodeFlow
NodeFlow is a library that makes visualizing hierarchical content easier. -
ImageLayout
Android - A layout that arranges its children in relation to a background image -
Android-MosaicLayout-v0.1
[UNMAINTAINED]: AndroidMosaicLayout is android layout to display group of views as grid consists of different asymmetric patterns (90 different patterns). -
android-linear-layout-manager
Linear Layout Manager which supports WRAP_CONTENT -
BeerSwipeRefresh
This project aims to provide a reusable Swipe to Refresh widget for Android. -
Android-RatioLayout
This is a specified proportion to the size of the Layout or View support library, with which you can easily set a fixed ratio of the size of the Layout or View, internal adaptive size calculation, completely abandon the code to calculate the size! If you have any questions in the course or suggestions, please send an e-mail to the following e-mail, thank you! -
Android-MaterialDeleteLayout
Maetrial Design Delete Concept Implement -
BlurZoomGallery
Extended CoordinatorLayout, that helps creating background galleries -
RearrangeableLayout
An android layout to re-arrange child views via dragging -
GooglePlusLayout
GoolgePlusLayout is a custom layout that plays animation on the children views while scrolling as the layout in the Google Plus (android) main page -
android-gridlayout
A backwards compatible implementation of GridLayout for Android -
Android Accordion Swipe Layout
Accordion Swipe Layout for Android
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of DragLinearLayout or a related project?
README
DragLinearLayout
An Android LinearLayout
that supports draggable and swappable child View
s.
Why?
Why bother doing drag & swap in a LinearLayout
when there are
so many solutions for ListView
?
- Simplicity - no need for
ListAdapter
s. By default, works like aLinearLayout
. - Flexibility - supports heterogeneous, selectively draggable (or not draggable), children.
- Portability - can be used in any layout, e.g. as a child in a
ScrollView
container.
Usage
Add it to your project using Gradle:
compile 'com.jmedeisis:draglinearlayout:1.1.0'
The DragLinearLayout
can be used in place of any LinearLayout
. However, by default, children
will not be draggable. To set an existing View
as draggable, use
DragLinearLayout#setViewDraggable(View, View)
, passing in the child View
and a (non-null!)
View
that will act as the handle for dragging it (this can be the View
itself).
XML layout file:
<com.jmedeisis.draglinearlayout.DragLinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/text" />
<ImageView
android:layout_width="match_parent"
android:layout_height="120dp"
android:scaleType="centerCrop"
android:src="@drawable/image"/>
<Button
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/button_text"/>
</com.jmedeisis.draglinearlayout.DragLinearLayout>
Enabling drag & swap for all child views:
DragLinearLayout dragLinearLayout = (DragLinearLayout) findViewById(R.id.container);
for(int i = 0; i < dragLinearLayout.getChildCount(); i++){
View child = dragLinearLayout.getChildAt(i);
// the child will act as its own drag handle
dragLinearLayout.setViewDraggable(child, child);
}
Use #addDragView(View, View)
,#addDragView(View, View, int)
and #removeDragView(View)
to
manage draggable children dynamically:
final View view = View.inflate(context, R.layout.view_layout, null);
dragLinearLayout.addDragView(view, view.findViewById(R.id.view_drag_handle));
// ..
dragLinearLayout.removeDragView(view);
Attach an OnViewSwapListener
with #setOnViewSwapListener(OnViewSwapListener)
to detect changes
to the ordering of child View
s:
dragLinearLayout.setOnViewSwapListener(new DragLinearLayout.OnViewSwapListener() {
@Override
public void onSwap(View firstView, int firstPosition,
View secondView, int secondPosition) {
// update data, etc..
}
});
When placing the DragLinearLayout
inside a ScrollView
, call #setContainerScrollView(ScrollView)
to enable the user to scroll while dragging a child view.
For best visual results, use children that have opaque backgrounds. Furthermore, do not use
horizontal padding for the DragLinearLayout
; instead, let children apply their own horizontal
padding.
Refer to the included sample activity project for a demonstration of the above usage techniques and more.
Limitations
- Supports only the
LinearLayout#VERTICAL
orientation.
License
This project is licensed under the terms of the MIT license.
You may find a copy of the license in the included LICENSE
file.
*Note that all licence references and agreements mentioned in the DragLinearLayout README section above
are relevant to that project's source code only.