Description
Swipe Layout similar to iOS Mail App
Android Accordion Swipe Layout alternatives and similar packages
Based on the "Layout Widget" category.
Alternatively, view Android Accordion Swipe Layout alternatives based on common mentions on social networks and blogs.
-
SmartRefreshLayout
SmartRefreshLayout extended the thoughts of SwipeRefreshLayout,using a ViewGroup to include a list of Views, to maintain its low coupling and high versatility -
AndroidSwipeLayout
The Most Powerful Swipe Layout! -
FlycoTabLayout
An Android TabLayout Lib has two kinds of TabLayout at present. -
ResideLayout
An Android Layout which has a same function like -
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
FoldingCell is an expanding content cell inspired by folding paper material -
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 -
DragTopLayout
Drag down to show a view on the top. -
SwipeRevealLayout
A layout that you can swipe/slide to show another layout. -
SuperSwipeRefreshLayout
A Custom SwipeRefreshLayout -
SmoothRefreshLayout
A highly efficient refresh library for Android . In theory , Can support all Views.一个高效的Android刷新库,理论上支持所有的视图,比官方的SwipeRefreshLayout更强大且使用方便. -
Search-View-Layout
[BETA] Search View Layout like Lollipop Dialler -
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 an Android library that provides a simple way to visualize hierarchical content. -
ImageLayout
Android - A layout that arranges its children in relation to a background image -
DragLinearLayout
Android LinearLayout with drag and drop to reorder. -
Android-MosaicLayout-v0.1
Mosaiclayout is android layout to display group of views in more that 92 different patterns. -
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-linear-layout-manager
Implementation of LinearLayoutManager which wraps its contents. -
FabTransitionLayout
Provides the Floating Action Button Transition as specified in the Material Design Guide in a simple library. -
BeerSwipeRefresh
This project aims to provide a reusable Swipe to Refresh widget for Android. -
Android-MaterialDeleteLayout
Maetrial Design Delete Concept Implement -
ScalableLayout
Scalable Layout For Android -
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 -
PrismView
PrismView provides animations for your views, similar to Dragger, but with fragments! You can change the fragment of the PrismView any time. -
ScrollDownLayout
A custom Android Widget,support u use ViewPager in a ScrollView or ListView。 -
ZigzagView
a zigzag view for using for ticket or invoice
Get performance insights in less than 4 minutes
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of Android Accordion Swipe Layout or a related project?
README
Android Accordion Swipe Layout
Inspired by iOS Mail app
Easy accordion swipe layout for Android.
Very easy to use
Step 1
Gradle
Add to root project gradle
allprojects {
repositories {
maven {
url "https://jitpack.io"
}
}
}
Add dependency to app gradle
compile 'com.github.alexandrius:accordion-swipe-layout:0.5.0'
Step 2
Create main layout for your swipable item.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#a9a9a9"
android:gravity="center"
android:text="This is sample" />
</LinearLayout>
Step 3
Create array.xml in your values folder Add custom integer arrays for drawables and swipable item backgrounds
Example:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer-array name="rightColors">
<item>@color/color1</item>
<item>@color/color2</item>
<item>@color/color3</item>
</integer-array>
<integer-array name="leftColors">
<item>@color/color4</item>
<item>@color/color5</item>
<item>@color/color6</item>
</integer-array>
<integer-array name="rightDrawables">
<item>@mipmap/ic_reload</item>
<item>@mipmap/ic_settings</item>
<item>@mipmap/ic_trash</item>
</integer-array>
<integer-array name="leftDrawables">
<item>@mipmap/ic_reload</item>
</integer-array>
<string-array name="rightTexts">
<item>@string/reload</item>
<item>@string/settings</item>
<item>@string/trash</item>
</string-array>
</resources>
Step 4
Add SwipeLayout into your layout
<com.alexandrius.accordionswipelayout.library.SwipeLayout
android:id="@+id/swipe_layout"
android:layout_width="match_parent"
android:layout_height="80dp"
app:iconSize="@dimen/icon_size"
app:foregroundLayout="@layout/sample_item"
app:leftItemColors="@array/leftColors"
app:leftItemIcons="@array/leftDrawables"
app:rightItemColors="@array/rightColors"
app:rightItemIcons="@array/rightDrawables"
app:swipeItemWidth="@dimen/swipe_item_width" />
Available attrs:
- iconSize
- foregroundLayout - pass id of previously created layout
- leftItemColors
- leftItemIcons
- leftTextColors
- rightTextColors
- rightItemColors
- rightItemIcons
- swipeItemWidth
- leftStrings
- rightStrings
- textSize
- textTopMargin
- customFont
- canFullSwipeFromLeft
- canFullSwipeFromRight
- autoHideSwipe - automatically collapse item on scroll
- onlyOneSwipe - automatically collapse other item if expanded
canFullSwipeFromLeft - set swipe to maximum width (like in gif preview) from left. Executes listener for first item
canFullSwipeFromRight - set swipe to maximum width (like in gif preview) from right. Executes listener for last item
Step 5
Add click listener to swipe items
SwipeLayout swipeLayout = (SwipeLayout) findViewById(R.id.swipe_layout);
swipeLayout.setOnSwipeItemClickListener(new SwipeLayout.OnSwipeItemClickListener() {
@Override
public void onSwipeItemClick(boolean left, int index) {
if (left) {
switch (index) {
case 0:
break;
}
} else {
switch (index) {
case 0:
break;
}
}
}
});
Expand and collapse programmatically
ITEM_STATE_LEFT_EXPAND
ITEM_STATE_RIGHT_EXPAND
ITEM_STATE_COLLAPSED
swipeLayout.setItemState(SwipeLayout.ITEM_STATE_LEFT_EXPAND, animated);
That's pretty much it. Thanks