Swipecards alternatives and similar packages
Based on the "Other Widget" category.
Alternatively, view Swipecards alternatives based on common mentions on social networks and blogs.
-
ShortcutBadger
The ShortcutBadger makes your Android App show the count of unread messages as a badge on your App shortcut! -
Litho (By Facebook)
A declarative framework for building efficient UIs on Android. -
DragSortListView
Extension of the Android ListView that enables drag-and-drop reordering (No longer maintained). -
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. -
aFileChooser
Android library that provides a file explorer to let users select files on external storage. -
TourGuide
TourGuide is an Android library that aims to provide an easy way to add pointers with animations over a desired Android View -
AndroidQuery
Android-Query (AQuery) is a light-weight library for doing asynchronous tasks and manipulating UI elements in Android. -
android-segmented-control
ios7 UISegmentedControl for android -
MultiSnapRecyclerView
Android library for multiple snapping of RecyclerView -
StickyGridHeaders
An Android Library that makes it easy to make grid views with sectioned data and headers that stick to the top. -
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 -
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. -
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. -
SortableTableView
An Android library containing a simple TableView and an advanced SortableTableView providing a lot of customisation possibilities to fit all needs. -
ScratchView
ScratchView repo is UX Design involving scratch cards like views which are scratched to reveal the information they conceal. -
android-FlipView
A small, easy to use android library for implementing flipping between views as seen in the popular Flipboard application
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 Swipecards or a related project?
README
Swipecards
A Tinder-like cards effect as of August 2014. You can swipe left or right to like or dislike the content. The library creates a similar effect to Tinder's swipable cards with Fling animation.
It handles greatly asynchronous loading of adapter's data and uses the same layout parameters as FrameLayout (you may use android:layout_gravity
in your layout xml file).
Installation
Go ahead find the latest version on Gradle please cowboy!
Be sure to add the @aar
suffix.
dependencies {
compile 'com.lorentzos.swipecards:library:[email protected]'
}
Example
The example is quite straightforward and documented in comments. You may find it under the relevant directory.
//implement the onFlingListener
public class MyActivity extends Activity {
...
@Override
protected void onCreate(Bundle savedInstanceState) {
...
//add the view via xml or programmatically
SwipeFlingAdapterView flingContainer = (SwipeFlingAdapterView) findViewById(R.id.frame);
al = new ArrayList<String>();
al.add("php");
al.add("c");
al.add("python");
al.add("java");
//choose your favorite adapter
arrayAdapter = new ArrayAdapter<String>(this, R.layout.item, R.id.helloText, al );
//set the listener and the adapter
flingContainer.setAdapter(arrayAdapter);
flingContainer.setFlingListener(new SwipeFlingAdapterView.onFlingListener() {
@Override
public void removeFirstObjectInAdapter() {
// this is the simplest way to delete an object from the Adapter (/AdapterView)
Log.d("LIST", "removed object!");
al.remove(0);
arrayAdapter.notifyDataSetChanged();
}
@Override
public void onLeftCardExit(Object dataObject) {
//Do something on the left!
//You also have access to the original object.
//If you want to use it just cast it (String) dataObject
Toast.makeText(MyActivity.this, "Left!", Toast.LENGTH_SHORT).show();
}
@Override
public void onRightCardExit(Object dataObject) {
Toast.makeText(MyActivity.this, "Right!", Toast.LENGTH_SHORT).show();
}
@Override
public void onAdapterAboutToEmpty(int itemsInAdapter) {
// Ask for more data here
al.add("XML ".concat(String.valueOf(i)));
arrayAdapter.notifyDataSetChanged();
Log.d("LIST", "notified");
i++;
}
});
// Optionally add an OnItemClickListener
flingContainer.setOnItemClickListener(new SwipeFlingAdapterView.OnItemClickListener() {
@Override
public void onItemClicked(int itemPosition, Object dataObject) {
makeToast(MyActivity.this, "Clicked!");
}
});
}
}
You can alternatively use a helpful method which sets in one line both the listeners and the adapter.
// where "this" stands for the Context
flingContainer.init(this, arrayAdapter);
Adding buttons is easy. Get the top card listener and trigger manually the right or left animation. On the end of the animation the above listeners (e.g. removeFirstObjectInAdapter) will be triggered depending on the direction.
/**
* Trigger the right event manually.
*/
flingContainer.getTopCardListener().selectRight();
Tip: If you start a new Activity in the onItemClicked
you will probably want to avoid double activity instances.
If so these solutions might work for you: 1,
2 and I personally prefer 3
Configuration
You can optionally specify some attrs for the animation and the stack. The easiest way is in xml:
<com.lorentzos.flingswipe.SwipeFlingAdapterView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:rotation_degrees="16"
app:max_visible="4"
app:min_adapter_stack="6" />
Or use styles:
<!-- Base application theme. -->
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="SwipeFlingStyle">@style/SwipeFling</item>
</style>
- rotation_degrees: the degrees of the card rotation offset
- max_visible: the max visible cards at the time
- min_adapter_stack: the min number of objects left. Initiates onAdapterAboutToEmpty() method.
License
Copyright 2014 Dionysis Lorentzos
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 Swipecards README section above
are relevant to that project's source code only.