I've got a pretty weird issue and can't find a solution. These two pictures show my problem:
In the first picture you can see, that there is no fading edge. If I move the bottom gallery a little bit further, the upper small gallery switches its position (I implemented this behaviour) and now there is a fading edge on both galleries.
The issue comes from the small gallery. But I don't understand why it is affecting the fading edge of the bigger gallery. The same effect appears on the right sight.
Both galleries are nested in a linear layout, which is nested again in a linear layout. I never touch the values for the fading edge.
Does somebody have an idea how to fix the issue?
It seems the fading is added automatically and disabling through XML doesn't work.
However disabling programatically seems to work:
Gallery carousel = (Gallery)findViewById(R.id.image_carousel);
carousel.setHorizontalFadingEdgeEnabled(false);
Related
In the ListView from Android you got native an fading edge on the top and bottom of the view if you are getting to the end or top of the list while scrolling.
Now I was wondering if it was possible to build that same fading edge into the edges of the screen of my application? (So basically in my RelativeLayout)
Can someone give me some guidance on this?
Here is a picture for a better understanding for what I want to achieve.
If I drag an object to the left I want to fade in the blue edge and if I get closer to the edge it must be getting brighter and stronger as color.
What you need to do is put your RelativeLayout inside a HorizontalScrollview and add the following line to your HorizontalScrollview:
android:overScrollMode="always"
You also can do it in code:
yourHorizontalScrollview.setOverScrollMode(View.OVER_SCROLL_ALWAYS);
Check the following link if you want some more information.
http://developer.android.com/reference/android/view/View.html#setOverScrollMode(int)
I have a fullscreen view which I partially move in and out from the phone screen, let's say to the half of the screen.
To do this I am using MarginLayoutParameters to set the top margin to half of the screen, or to 0 in case I want it to be fully visible.
Everything works perfect but now that I am testing on other phones, which seem to be the ones of low resolution, the view is correctly cut by half but is always aligned to the top.
Trying left and right margins also always aligns it to the left.
Am I missing something that newer phones/ Android OS already does for me?.
This view is inside a FrameLayout.
Thanks in advance.
Well I just used setPadding with the same results I wanted to achieve, but my question still remains.
I want to make a book page scrolling effect like the picture below.
This is a Standby screen in Acer Liquid.
It shows a transparent layout slidable with many views on it, and the left-bottom corner shows a book page rolling-up effect. The corner rolled is draggable and transparent.
If I slide the views, the corner rolled shows the views' moving with transparent.
That is what I don't know how to do.
I did the corner rolled with a screenshot bitmap. Take a screenshot and roll it up... That's what I did. And that means the corner rolled will be no change if I slide the views.. because it is a picture!
Does anybody know how to do that?
There is an open source library you can use. https://github.com/harism/android_page_curl
So I have multiple very long images (like 2000x100) that i want to have scrolling across the screen at different speeds. and my original solution is not working out. Originally, I placed them all in a HorizontalScrollView, and made a runnable that used setPadding to adjust the position of the ImageViews within the scrollView. This works, however, the background that is supposed to remain mostly stationary on the screen, shakes back and forth as you scroll, and lags behind the scroll location significantly. It's choppy and it looks bad.
Is there any other way that I can move images across the screen to achieve the desired effect?
(could I perhaps use a frame layout, and set an ontouchlistener? then how would you move the layout across the screen?)
I set up a layout so that the images protrude off of the right of the screen correctly, but I can't seem to move them off of the left of the screen (setpadding(-50,0,0,0) does not work)
Thanks in advance!
I solved this by using relative layouts within a frame layout. I set an ontouchlistener for the frame layout and used the scrollTo method for each image with a modifying coefficient. I had not previously noticed the scrollTo and scrollBy methods of the layout.
I know this question has been asked before, but I couldn't get an answer for my issue. I have a large image, and I would like to display it with it's full sizes (in fact its a custom map image). I know that the image can be scrolled by swiping the finger, but my question is if there is a way to implement a vertical / horizontal scrollview for this. I would like to be able to use the scrollview features (swiping the finger an the image is scrolling by itself).
Using a HorizontalScrollView inside a ScrollView didn't work either. The horizontal scroll bar appears only sometimes, and there is no way you can scroll in both directions.
Any help is appreciated.
Thanls a lot,
Gratzi
I've just answerd that question here Images in ScrollView in android
However it does not do scrolling by itself, that would need more programming.