android-viewflow
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
Android-ObservableScrollView
Android-ObservableScrollView
Build Status Coverage Status Maven Central API Android Arsenal
Android library to observe scroll events on scrollable views.
It's easy to interact with the Toolbar introduced in Android 5.0 Lollipop and may be helpful to implement look and feel of Material Design apps.
Examples
Download from Google Play
Get it on Google Play
Please note that the app on the Play store is not always the latest version.
Download from wercker
If you are a wercker user, you can download the latest build artifact.
See here for details.
wercker status
Install manually
Just clone and execute installDevDebug task with Gradle.
See here for details.
Usage
Add com.github.ksoichiro:android-observablescrollview to your dependencies in build.gradle.
Add ObservableListView or other views you'd like to use.
Write some animation codes to the callbacks such as onScrollChanged, onUpOrCancelMotionEvent, etc.
See the quick start guide for details, and the documentation for further more.
Reference
Supported widgets
Environment
Release notes
FAQ
Apps that use this library
Badge
Jair Player by Akshay Chordiya
My Gradle by Erick Chavez Alcarraz
ThemeDIY by Darkion Avey
{Soft} Skills by Fanatic Devs
If you're using this library in your app and you'd like to list it here,
please let me know via email or pull requests or issues.
Contributions
Any contributions are welcome!
Please check the FAQ and contributing guideline before submitting a new issue.
Developed By
Soichiro Kashima -
[email protected]
Thanks
Inspired by ObservableScrollView in romannurik-code.
License
Copyright 2014 Soichiro Kashima
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.
Android-PickerView
PickerView (2.x系列)
精仿iOS的PickerView控件,有时间选择和选项选择并支持一二三级联动效果
——TimePickerView 时间选择器,支持年月日时分,年月日,年月,时分等格式
——OptionsPickerView 选项选择器,支持一,二,三级选项选择,并且可以设置是否联动
2.x是全新的3D效果,比1.x版本更加贴近iOS的效果,从外观细节上也得到了改善。api兼容1.x版本,只需要把依赖的版本号升级即可,几乎不用修改代码即可完成升级。
使用gradle 依赖:
compile 'com.bigkoo:pickerview:2.0.8'
Demo 图片
demo代码请看戳这里
更新说明
v2.0.0 不需修改任何代码就可以兼容1.x
外观大整改
支持反射获取getPickerViewText()来获取要展示数据,以前只能传String的对象,现在可以传任意对象只要有getPickerViewText()函数即可显示对应的字符串,如果没有getPickerViewText()函数则使用对象toString作为显示
加入setTitle
v2.0.1
去掉popupWindow,改用View,类名也对应修改为TimePickerView和 OptionsPickerView
加入遮罩效果
v2.0.2
修复不循环模式下点击空白item处出现数组越界问题
修复循环模式下只有一条数据的时候只显示三条而不是填充满高度问题
v2.0.3
修复时间选择的时候部分数字选不到直接跳到下一个数字的问题
v2.0.4
修复不循环模式下顶部超出范围问题
wheel view文字颜色通过xml配置
v2.0.5
修复不循环模式下底部超出范围问题
v2.0.6
修复不循环模式下点击超出范围问题,修复后点击空白的地方,只能滚到最顶或最底,不会滚出数据范围。
v2.0.7
修复设置初始化position ,第三级数据不对的BUG。
v2.0.8
修复#41 未选中项有错乱数据问题。
加入pickerview_customTextSize 和 pickerview_textsize 到 xml 中 来控制自定义文字大小
---------------------华丽丽的分割线--------------------------
PickerView1.x (我已经把1.0.3版本分到v1.x的分支去了,停止维护1.x的分支)
使用gradle 依赖:
compile 'com.bigkoo:pickerview:1.0.3'
Demo 图片(招行信用卡的“掌上生活”里面条件选择器他们用的就是我这个库,大家可以当实际项目参考)
Thanks
WheelView
androidWheelView
AndroidPhotoView
PhotoView
PhotoView aims to help produce an easily usable implementation of a zooming Android ImageView.
Branch Develop: Build Status Branch Master: Build Status
PhotoView
Features
Out of the box zooming, using multi-touch and double-tap.
Scrolling, with smooth scrolling fling.
Works perfectly when used in a scrolling parent (such as ViewPager).
Allows the application to be notified when the displayed Matrix has changed. Useful for when you need to update your UI based on the current zoom/scroll position.
Allows the application to be notified when the user taps on the Photo.
Sample Application
The sample application (the source is in the repository) has been published onto Google Play for easy access:
Get it on Google Play
Gradle Dependency
Add this in your root build.gradle file (not your module build.gradle file):
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
Then, add the library to your project build.gradle
dependencies {
compile 'com.github.chrisbanes:PhotoView:1.2.6'
}
Sample Usage
There is a sample provided which shows how to use the library in a more advanced way, but for completeness here is all that is required to get PhotoView working:
ImageView mImageView;
PhotoViewAttacher mAttacher;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Any implementation of ImageView can be used!
mImageView = (ImageView) findViewById(R.id.iv_photo);
// Set the Drawable displayed
Drawable bitmap = getResources().getDrawable(R.drawable.wallpaper);
mImageView.setImageDrawable(bitmap);
// Attach a PhotoViewAttacher, which takes care of all of the zooming functionality.
// (not needed unless you are going to change the drawable later)
mAttacher = new PhotoViewAttacher(mImageView);
}
// If you later call mImageView.setImageDrawable/setImageBitmap/setImageResource/etc then you just need to call
mAttacher.update();
Issues With ViewGroups
There are some ViewGroups (ones that utilize onInterceptTouchEvent) that throw exceptions when a PhotoView is placed within them, most notably ViewPager and DrawerLayout. This is a framework issue that has not been resolved. In order to prevent this exception (which typically occurs when you zoom out), take a look at HackyDrawerLayout and you can see the solution is to simply catch the exception. Any ViewGroup which uses onInterceptTouchEvent will also need to be extended and exceptions caught. Use the HackyDrawerLayout as a template of how to do so. The basic implementation is:
public class HackyProblematicViewGroup extends ProblematicViewGroup {
public HackyProblematicViewGroup(Context context) {
super(context);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
try {
return super.onInterceptTouchEvent(ev);
} catch (IllegalArgumentException e) {
//uncomment if you really want to see these errors
//e.printStackTrace();
return false;
}
}
}
Usage with Fresco
Due to the complex nature of Fresco, this library does not currently support Fresco. See this project as an alternative solution.
Subsampling Support
This library aims to keep the zooming implementation simple. If you are looking for an implementation that supports subsampling, check out this project
Pull Requests / Contribution
Development happens in develop branch of this repository, and Pull Requests should be filled against that branch. Any Pull Request against master will be rejected
License
Copyright 2011, 2012 Chris Banes
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.
Android View Animations
For making animations more real, I created another project named Android Easing Functions which is an implementations of easing functions on Android. So, we need to dependent that project.
Step 1
Gradle
dependencies {
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.easing:library:1.0.1@aar'
compile 'com.daimajia.androidanimations:library:1.1.3@aar'
}
Maven
<dependency>
<groupId>com.nineoldandroids</groupId>
<artifactId>library</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>com.daimajia.androidanimation</groupId>
<artifactId>library</artifactId>
<version>1.1.3</version>
<type>apklib</type>
</dependency>
<dependency>
<groupId>com.daimajia.easing</groupId>
<artifactId>library</artifactId>
<version>1.0.1</version>
<type>apklib</type>
</dependency>
Eclipse
Download the following jars, and copy them into your libs directory.
NineOldAndroid-2.4.0
AndroidEasingFunctions-1.0.0
AndroidViewAnimations-1.1.3
Step 2
Just like play Yo-yo.
YoYo.with(Techniques.Tada)
.duration(700)
.playOn(findViewById(R.id.edit_area));
Effects
Attension
Flash, Pulse, RubberBand, Shake, Swing, Wobble, Bounce, Tada, StandUp, Wave
Special
Hinge, RollIn, RollOut,Landing,TakingOff,DropOut
Bounce
BounceIn, BounceInDown, BounceInLeft, BounceInRight, BounceInUp
Fade
FadeIn, FadeInUp, FadeInDown, FadeInLeft, FadeInRight
FadeOut, FadeOutDown, FadeOutLeft, FadeOutRight, FadeOutUp
Flip
FlipInX, FlipOutX, FlipOutY
Rotate
RotateIn, RotateInDownLeft, RotateInDownRight, RotateInUpLeft, RotateInUpRight
RotateOut, RotateOutDownLeft, RotateOutDownRight, RotateOutUpLeft, RotateOutUpRight
Slide
SlideInLeft, SlideInRight, SlideInUp, SlideInDown
SlideOutLeft, SlideOutRight, SlideOutUp, SlideOutDown
Zoom
ZoomIn, ZoomInDown, ZoomInLeft, ZoomInRight, ZoomInUp
ZoomOut, ZoomOutDown, ZoomOutLeft, ZoomOutRight, ZoomOutUp
Welcome contribute your amazing animation effect. :-D
AndroidViewHover
dependencies {
compile "com.android.support:support-v4:20.+"
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.easing:library:1.0.0@aar'
compile 'com.daimajia.androidanimations:library:1.1.2@aar'
compile 'com.daimajia.androidviewhover:library:1.0.4@aar'
}
Create an original view, and make sure it was wrapped by BlurLayout
for example:
<com.daimajia.androidviewhover.BlurLayout
android:id="@+id/sample"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_centerInParent="true"
android:scaleType="fitXY"
android:src="@drawable/kid"
android:layout_width="match_parent"/>
</com.daimajia.androidviewhover.BlurLayout>
Note: BlurLayout is entended from RelativeLayout. You can use the RelativeLayout rules to layout your view.
Create a hover view, there is no rules to obey. Just please remember that this view will be stretched as large as the original view you have created.
Bind a hover view to BlurLayout
BlurLayout sampleLayout = (BlurLayout)findViewById(R.id.sample);
View hover = LayoutInflater.from(mContext).inflate(R.layout.hover, null);
sampleLayout.setHoverView(hover);
and don't forget that you can add various animations just in one line code. For example:
//View (R.id.heart) appear animation.
sampleLayout.addChildAppearAnimator(hover, R.id.heart, Techniques.FlipInX);
//View (R.id.heart) disappear animation.
sampleLayout.addChildDisappearAnimator(hover, R.id.heart, Techniques.FlipOutX);
You can view the samples in my preset examples.
Android XMPP好友列表+聊天
Android XMPP好友列表+聊天,服务器当前设置192.168.1.5
Android下拉刷新
Android 下拉刷新列表,类似QQ的下来刷新
Ubuntu AirCrack
Ubuntu AirCrack和Spoonwep功能类似
ISAPI入门配置和程序-手把手教你用VC写ISAPI程序
ISAPI入门配置和程序-手把手教你用VC写ISAPI程序,简单的ISAPI过滤器和执行程序配置,编写
php常用函数查询手册
PHP开发者必备 函数查询手册,常用函数
ARM中文指令查询手册
ARM的中文开发指令手册,包括常用指令查询
ARM 入门程序实例
经典的ARM编程的实例,适合初学者阅读和入门
ARM编程经典300问
ARM编程经典300问,300个经典ARM问题,适合初学者阅读
CBX开发人员手册,Delphi的CBX控件开发
CBX开发人员手册,Delphi的CBX控件开发网络客户,服务端程序
用DirectShow抓取影片帧
用DirectShow抓取影片帧的VC类文件
DirectX Input获得鼠标输入
DirectX Input获得鼠标输入 ,DirectX程序中获取鼠标输入的类
使用DirectShow播放Mpeg等媒体类型
使用DirectShow播放Mpeg等媒体类型
使用DirectSound播放wave文件的程序代码
使用DirectSound播放wave文件的程序代码
Direct3D9初级教程.pdf
Direct3D9初级教程.pdf,DirectX编程指导,3D编程指导
Delphi.下深入Windows核心编程.pdf(第三分卷共三分卷)
Delphi.下深入Windows核心编程.pdf(第三分卷共三分卷)
Delphi.下深入Windows核心编程.pdf(第一分卷共三分卷)
Delphi.下深入Windows核心编程.pdf(第一分卷共三分卷)
VC++中如何遍历整个目录树查找文件
VC++中如何遍历整个目录树查找文件VC++中如何遍历整个目录树查找文件
Visual C++中使用OLE DB读写SQL Server简明指南
Visual C++中使用OLE DB读写SQL Server简明指南
VC下面制作超联接控件
VC制作超联接控件,在VC程序中添加超链接控件方法
VC++ 的串口通讯
VC++ 的串口通讯,VC串口通信,代码
VC保存文件的参考代码
VC保存文件的参考代码,不错,实现VC保存功能代码