android-viewflow alternatives and similar packages
Based on the "Other Widget" category.
Alternatively, view android-viewflow 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. -
Swipecards
A Tinder-like Android library to create the swipe cards effect. You can swipe left or right to like or dislike the content. -
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 -
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. -
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 android-viewflow or a related project?
README
View Flow for Android
ViewFlow is an Android UI widget providing a horizontally scrollable ViewGroup with items populated from an Adapter. Scroll down to the bottom of the page for a screen shot.
The component is a Library Project. This means that there's no need to copy-paste resources into your own project, simply add the viewflow component as a reference to any project.
When to use
This library might be suitable if you have an indeterminate number of views in your viewflow, if instead you have a static numbers of views you ought to look at Fragments and the ViewPager in the Compatibility Library instead.
Usage
In your layout
<org.taptwo.android.widget.ViewFlow
android:id="@+id/viewflow"
app:sidebuffer="5"
/>
The use of app:sidebuffer
is optional. It defines the number of Views to buffer on each side of the currently shown View. The default sidebuffer is 3, making up a grand total of 7 (3 * 2 + 1) Views loaded at a time (at max).
To be able to use the more convenient app:sidebuffer
attribute, the application namespace must be included in the same manner as the android namespace is. Please refer to the layout main.xml in the example project for a full example. Again, note that it's the application namespace and not the viewflow namespace that must be referred like xmlns:app="http://schemas.android.com/apk/res/your.application.package.here"
.
In your activity
ViewFlow viewFlow = (ViewFlow) findViewById(R.id.viewflow);
viewFlow.setAdapter(myAdapter);
Setting a different initial position (0 being default) is as easy as:
viewFlow.setAdapter(myAdapter, 8);
Although possible, you should not call setSelection(...)
immediately after calling setAdapter(myAdapter)
as that might load unnecessary views giving you a decrease in performance.
Listen on screen change events
If you need to listen to screen change events you would want to implement your own ViewFlow.ViewSwitchListener
and pass it to the setOnViewSwitchListener()
method.
viewFlow.setOnViewSwitchListener(new ViewSwitchListener() {
public void onSwitched(View v, int position) {
// Your code here
}
});
Listen on initialize view events
If you need a lazy View initialization you would want to implement your own ViewFlow.ViewLazyInitializeListener
and pass it to the setOnViewLazyInitializeListener()
method.
viewFlow.setOnViewLazyInitializeListener(new ViewLazyInitializeListener() {
public void onViewLazyInitialize(View view, int position) {
// Your code here e.g.
((MyAdapter)((AbsListView)view).getAdapter()).initializeData();
}
});
Flow Indicator
It is also possible to add a flow view indicator to your layout. The purpose of a FlowIndicator
is to present a visual representation of where in the item list focus is at. You may either implement a FlowIndicator
yourself or use an implementation provided by the View Flow library. The View Flow library currently supports the following indicators:
Circle Flow Indicator
This indicator shows a circle for each View
in the adapter with a special circle representing the currently selected view (see screenshot below).
<org.taptwo.android.widget.CircleFlowIndicator
android:padding="10dip" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:id="@+id/viewflowindic"
android:background="#00000000"/>
And then you'll need to connect your ViewFlow
with the FlowIndicator
:
CircleFlowIndicator indic = (CircleFlowIndicator) findViewById(R.id.viewflowindic);
viewFlow.setFlowIndicator(indic);
By default, the 'active' indicator moves smoothly from one 'inactive' indicator
to the next, as the user scrolls. If you set the snap
attribute to true
, it
will instead jump to the next position when the flow settles at the next page.
The following attributes are supported: activeColor
, inactiveColor
,
activeType
(either fill or stroke), inactiveType
(either fill or stroke),
fadeOut
(time in ms until indicator fades out, 0 = never), radius
, sync
(see above).
Title Flow Indicator
This indicator presents the title of the previous, current and next View
in the adapter (see screenshot below).
<org.taptwo.android.widget.TitleFlowIndicator
android:id="@+id/viewflowindic" android:layout_height="wrap_content"
android:layout_width="fill_parent"
app:footerLineHeight="2dp"
app:footerTriangleHeight="10dp" app:textColor="#FFFFFFFF" app:selectedColor="#FFFFC445"
app:footerColor="#FFFFC445" app:titlePadding="10dp" app:textSize="11dp" app:selectedSize="12dp"
android:layout_marginTop="10dip"
app:clipPadding="5dp" />
And then you'll need to connect your ViewFlow
with the FlowIndicator
:
TitleFlowIndicator indicator = (TitleFlowIndicator) findViewById(R.id.viewflowindic);
indicator.setTitleProvider(myTitleProvider);
viewFlow.setFlowIndicator(indicator);
Building a jar file
If you rather want a jar file instead of a including the project as an android library, run ant jar
in the android-viewflow/viewflow
folder, to build a jar file.
Caveats
The manifest states a min sdk version of 4, which is true. But in any case you want to support an api level < 8 you will have to forward an onConfigurationChanged
event to the ViewFlow
from your Activity
. I know this isn't a very nice solution, feel free to propose better ones!
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
viewFlow.onConfigurationChanged(newConfig);
}
Contributions
The following persons deserves a mention for their contributions:
- Eric Taix
- Marc Reichelt, http://marcreichelt.blogspot.com/
Want to contribute?
GitHub has some great articles on how to get started with Git and GitHub and how to fork a project.
Contributers are recommended to fork the app on GitHub (but don't have too). Create a feature branch, push the branch to git hub, press Pull Request and write a simple explanation.
One fix per commit. If let's say a commit closes the open issue 12. Just add closes #12
in your commit message to close that issue automagically.
If you still feel uncomfortable contributing the project github-wise, don't hesistate to send a regular patch.
All code that is contributed must be compliant with Apache License 2.0.
License
Copyright (c) 2011 Patrik Åkerfeldt
Licensed under the Apache License, Version 2.0
*Note that all licence references and agreements mentioned in the android-viewflow README section above
are relevant to that project's source code only.