ExpandablePanel alternatives and similar packages
Based on the "Other Widget" category
-
ShortcutBadger
The ShortcutBadger makes your Android App show the count of unread messages as a badge on your App shortcut! -
DragSortListView
Extension of the Android ListView that enables drag-and-drop reordering (No longer maintained). -
Litho (By Facebook)
A declarative framework for building efficient UIs on Android. -
TapTargetView
An implementation of tap targets from the Material Design guidelines for feature discovery. -
android-viewbadger
A simple way to "badge" any given Android view at runtime without having to cater for it in layout -
android-stackblur
Android StackBlur is a library that can perform a blurry effect on a Bitmap based on a gradient or radius, and return the result. The library is based on the code of Mario Klingemann. -
DraggablePanel
Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube graphic component. -
Swipecards
A Tinder-like Android library to create the swipe cards effect. You can swipe left or right to like or dislike the content. -
aFileChooser
Android library that provides a file explorer to let users select files on external storage. -
AndroidQuery
Android-Query (AQuery) is a light-weight library for doing asynchronous tasks and manipulating UI elements in Android. -
TourGuide
TourGuide is an Android library that aims to provide an easy way to add pointers with animations over a desired Android View -
android-segmented-control
ios7 UISegmentedControl for android -
StickyGridHeaders
An Android Library that makes it easy to make grid views with sectioned data and headers that stick to the top. -
MultiSnapRecyclerView
Android library for multiple snapping of RecyclerView -
FloatingView
FloatingView can make the target view floating above the anchor view with cool animation. -
TileView
The TileView widget is a subclass of ViewGroup that provides a mechanism to asynchronously display tile-based images, with additional functionality for 2D dragging, flinging, pinch or double-tap to zoom, adding overlaying Views (markers), built-in Hot Spot support, dynamic path drawing, multiple levels of detail, and support for any relative positioning or coordinate system. -
Android-ActionItemBadge
This library offers a simple method to add a small badge icon to your ActionBar-MenuItem -
NiftyNotification
effects for android notifications.base on (Crouton) -
RippleView
View that imitates Ripple Effect on click which was introduced in Android L (for Android 2.3+) -
android-sliding-layer-lib
This repository host a library that provides an easy way to include an autonomous layer/view that slides from the side of your screen and which is fully gesture ready, the same way as our detail view in Wunderlist 2 does. This pattern can also be seen in Google+’s notification center or in Basecamp’s detail view. -
SortableTableView
An Android library containing a simple TableView and an advanced SortableTableView providing a lot of customisation possibilities to fit all needs. -
Emoji
A simple library to add Emoji support to your Android Application. In a PopupWindow Emojis can be chosen. In order to edit and display text with Emojis this library provides public APIs: EmojiEditText & EmojiTextView. -
android-FlipView
A small, easy to use android library for implementing flipping between views as seen in the popular Flipboard application
* 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 ExpandablePanel or a related project?
README
Expandable Panel Android Library
Check ExpandablePanel Demo application on GooglePlay:
Details
This Android library implements the expand by sliding logic for a top or a bottom view in a two children view composition. That's the default behaviour, but it allows you to set a different View as the expandable one, making this component support multiple views inside it.
It supports Android SDK 2.1 (Eclair)
as minimum.
ExpandablePanel library brings a custom view class called ExpandablePanelView
to the final user. It implements the needed logic for integrating the expandable logic into your own Android application.
Custom Attributes
ExpandablePanel lib allows you to customize the following properties. Feel free to combine them to create cool user interfaces:
expandablepanel:completionPercent
: % of the parent's height where you want the autocomplete animation to begin working.expandablepanel:completeExpandAnimationSpeed
: Speed for the autocomplete animation.expandablepanel:completeShrinkAnimationSpeed
: Speed for the autoshrink animation.expandablepanel:beginExpanded
: Use it if you need the topView to begin expanded. If that's your case, the view will play a bounce animation at start to inform the user about the hidden bottom view.expandablepanel:bounceCount
: Use it to set the number of times topView is going to play bounce animation when it begins expanded.expandablepanel:invertBehavior
: Use it to invert the panel's behaviour and make bottomView become the expandable one. You can combine it with any other custom attributes. Bounce animation will get inverted too when using this attr.expandablepanel:animableViewId
: Use it to assign an animable view using the view identifier if yourExpandablePanelView
contains more than 2 child. This attribute is not mandatory, if you don't use it, first or second child (based on theexpandablepanel:invertBehavior
attribute) is going to be used as the animable view.expandablepanel:autoAnimateOnClick
: Use this one to enable automatic expanding or shrinking when user clicks on animable view.
Usage
In order to make it work, you will need to use ExpandablePanelView
class into your Android XML Layout.
- 1. Add
ExpandablePanelView
to the layout. - 2. Add two children views to the ExpandablePanelView XML element.
- 3.
ExpandablePanelView
extendsRelativeLayout
, so you will need to give an android id to the top view and setup theandroid:below
attribute in the bottom one. - 4. Set the
xmlns:draggable_view="http://schemas.android.com/apk/res-auto"
if you are going to use any of the cusom attributes.
Use ExpandableListener
if you want your class to be able to get expandable callbacks. Following methods are offered to the user:
onExpandingStarted
: Dispatched when the user starts expanding the view.onExpandingFinished
: Dispatched when autocomplete expanding animation is finished.onShrinkStarted
: Dispatched when the user starts shrinking the view.onShrinkFinished
: Dispatched when autocomplete shrinking animation is finished.onExpandingTouchEvent
: Dispatched meanwhile the user is dragging to expand or shrink the view. This one is very useful if you want to map touch coordinates to your class and be able to use them for creating cool combined animations.
Basic Usage
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:expandablepanel="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<com.jorgecastilloprz.expandablepanel.ExpandablePanelView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/darker_gray"
expandablepanel:completionPercent="0.8"
expandablepanel:completeExpandAnimationSpeed="150"
expandablepanel:completeShrinkAnimationSpeed="200">
<ImageView
android:id="@+id/topLayout"
android:layout_width="match_parent"
android:layout_height="250dp"
android:src="@drawable/nightbackground"
android:scaleType="centerCrop"/>
<ImageView
android:background="@color/material_pink"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/topLayout"/>
</com.jorgecastilloprz.expandablepanel.ExpandablePanelView>
</RelativeLayout>
Begin Expanded Usage:
<com.jorgecastilloprz.expandablepanel.ExpandablePanelView
android:id="@+id/expandablePanelView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/darker_gray"
expandablepanel:completionPercent="0.8"
expandablepanel:completeExpandAnimationSpeed="150"
expandablepanel:completeShrinkAnimationSpeed="200"
expandablepanel:beginExpanded="true"
expandablepanel:bounceCount="2">
<ImageView
android:id="@+id/topLayout"
android:layout_width="match_parent"
android:layout_height="250dp"
android:src="@drawable/nightbackground"
android:scaleType="centerCrop"/>
<ImageView
android:background="@color/material_pink"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/topLayout"/>
</com.jorgecastilloprz.expandablepanel.ExpandablePanelView>
Invert Behaviour Usage:
- You will need to remove
android:layout_below
from bottomView and addandroid:layout_above
to the top one, in order to make Android capable of settingfixed bottomView height
before topViewmatch_parent
height. - You must set
android:layout_alignParentBottom="true"
in bottom view too.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:expandablepanel="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<com.jorgecastilloprz.expandablepanel.ExpandablePanelView
android:id="@+id/expandablePanelView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/darker_gray"
expandablepanel:completionPercent="0.8"
expandablepanel:completeExpandAnimationSpeed="150"
expandablepanel:completeShrinkAnimationSpeed="200"
expandablepanel:invertBehavior="true">
<RelativeLayout
android:id="@+id/topLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/bottomLayout">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="100">
<ImageView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="99"
android:src="@drawable/nightbackground"
android:scaleType="centerCrop"/>
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/flat_orange_bright" />
</LinearLayout>
<expandablepanel.jorgecastilloprz.com.expandablepanel.ui.components.CircledImageView
android:id="@+id/avatar"
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/avatar"
android:layout_centerInParent="true"/>
</RelativeLayout>
<ImageView
android:id="@+id/bottomLayout"
android:layout_width="match_parent"
android:layout_height="300dp"
android:src="@drawable/daybackground"
android:scaleType="centerCrop"
android:layout_alignParentBottom="true"/>
</com.jorgecastilloprz.expandablepanel.ExpandablePanelView>
</RelativeLayout>
Import ExpandablePanel dependency
Add the next code to your build.gradle project dependencies:
dependencies {
compile 'com.github.jorgecastilloprz:expandablepanel:1.0.4@aar'
}
Set the mavenCentral repo into the external build.gradle:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.+'
}
}
allprojects {
repositories {
mavenCentral()
}
}
If you are using Maven, use the following code:
<dependency>
<groupId>com.github.jorgecastilloprz</groupId>
<artifactId>expandablepanel</artifactId>
<version>1.0.4</version>
<type>aar</type>
</dependency>
Developer
- Jorge Castillo Pérez jorge.castillo.prz@gmail.com
- Twitter acc - @JorgeCastilloPr (https://twitter.com/jorgecastillopr)
License
Copyright 2014 Jorge Castillo Pérez
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*Note that all licence references and agreements mentioned in the ExpandablePanel README section above
are relevant to that project's source code only.