viewflipper

Developing an Android Homescreen

跟風遠走 提交于 2019-11-26 21:33:21
I am working on an app that has a homescreen. This homescreen should behave like the android homescreen where you can switch between several views by flinging your finger over the touch screen. The solution is easy. I have 3 view instances , right , left and current view . I get this instances from the viewflipper that I initialized earlier. Since I have a HTC G1 my sreen is 320 px in width and 480 px in height. Imagine you capture the down value of a action down motion event when you touch the screen. Then you move your finger and the screen should move in exactly the same way so you have to

Android: Moving background image while navigating through Views

六月ゝ 毕业季﹏ 提交于 2019-11-26 19:06:31
问题 What I want to have is a background image, which behaves like the stock homescreen or the weather app here: https://youtube.com/watch?v=i2Oh4GL5wBE#t=0m54s I just need a not animated background image (like the road in that video) which scrolls "a bit" while swiping to another view. In my app, I would like to swipe through some ListViews with a scrolling background. What I've tested: ViewFlipper: I used big image and cut it vertically into 5 pieces. Then I set those cutted images in each

Developing an Android Homescreen

寵の児 提交于 2019-11-26 09:06:26
问题 I am working on an app that has a homescreen. This homescreen should behave like the android homescreen where you can switch between several views by flinging your finger over the touch screen. The solution is easy. I have 3 view instances , right , left and current view . I get this instances from the viewflipper that I initialized earlier. Since I have a HTC G1 my sreen is 320 px in width and 480 px in height. Imagine you capture the down value of a action down motion event when you touch

ViewPager with previous and next page boundaries

你。 提交于 2019-11-26 02:04:56
问题 I\'m designing a view with multiple pages. I want edges of previous and next pages to be show like below and implement a 2 finger swipe to switch between pages. I tried using ViewPager with negative page margin as suggested here but that only shows one of the edges on the screen, not both simultaneously. Alternatively, is there any way i can position part of my view outside screen and then animate it giving it a ViewPager type effect. How should I go about it ? Thanks ! 回答1: Quoting myself