开发者

Changing view to gradually ViewSwitcher

开发者 https://www.devze.com 2023-04-10 03:51 出处:网络
Excuse my English I need to change the view ViewSwitcher according to the movement of the finger. Just like the Dock of the applications installed on the device. When I go moving your finger left or

Excuse my English

I need to change the view ViewSwitcher according to the movement of the finger. Just like the Dock of the applications installed on the device. When I go moving your finger left or right in small movements of the left and right views as they come up little by little and when I released my finger to view fu开发者_开发百科ll screen.

Today is my ViewSwitcher executed once the onset of the next view or the view above.

Looking back, I want the next view to appear little by little according to the movement of the user's finger, if it is with your finger until the middle of the screen, the view comes to the other half and add to the half, when released appears complete.

thanks


For this you can use the new ViewPager of android. It was introduced for honeycomb. But to use it for the earlier android versions you can use the android compatibility library. This is a standalone library that allows some of the honeycomb api's to be used in previous versions of android. The library jar is at the

E:\Program Files\Android\android-sdk-windows\android-compatibility\v4

This may very based on where you installed the sdk. Here is a demo with the source code, of what is capable with this library, ActionbarSherlock. Here is a google blog post.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号