Closed GoogleCodeExporter closed 9 years ago
Addding views to HorizontalScrollView
Original comment by malliknm...@gmail.com
on 30 Aug 2010 at 6:29
So basically the button is not shown when you want it to be clicked? Robotium
tries to emulate a real user so therefore if it can not reach the button
(hidden) it will not be able to click it. You should use scrollToSide() before
you use clickOnView()/clickOnButton().
Original comment by renasr...@gmail.com
on 31 Aug 2010 at 6:10
I tried it but i have one more scroll view before my HorizontalScrollView on
the screen.When i try to do scrollToSide() it happens to first scroll view not
to the
second one where my hidden button is.
Or How to scroll specifice ScrollView if there are more than one on screen.
Original comment by malliknm...@gmail.com
on 31 Aug 2010 at 5:33
Use drag() instead, then you can define yourself how it should drag the screen.
You might need to use 2 drags after eachother. There is functionality to choose
which list to scroll but not which scroll view to scroll.
Original comment by renasr...@gmail.com
on 31 Aug 2010 at 6:05
My HorizontalScrollView is very bottom of the screen and my hidden button is
far right in the scroll view , when i use drag(0,-50,0,0,10) nothing happens.
I am thinking this will move scrollview 50 units left from 0 in x direction and
keep y the same.
Original comment by malliknm...@gmail.com
on 31 Aug 2010 at 6:33
You should write:
int screenWidth =
solo.getCurrentActivity().getWindowManager().getDefaultDisplay().getWidth();
drag(0,width -10,0,0,10) //-10 or more depending how far in the right it
should start to drag.
Original comment by renasr...@gmail.com
on 31 Aug 2010 at 6:53
it should be:
drag(width -10,10,20,20,10) //You want to start the drag from the right. The 20
is where the dragging in y should start which should be depending on your
screen height.
Original comment by renasr...@gmail.com
on 31 Aug 2010 at 6:57
i get below error when i tried your idea.
check this link how my HorizontalScrollView look like
http://code.google.com/p/mobyfactory-uiwidgets-android/
08-31 15:31:21.435: INFO/TestRunner(2367):
junit.framework.AssertionFailedError: Application can not be dragged!
08-31 15:31:21.435: INFO/TestRunner(2367): at
junit.framework.Assert.fail(Assert.java:47)
08-31 15:31:21.435: INFO/TestRunner(2367): at
junit.framework.Assert.assertTrue(Assert.java:20)
08-31 15:31:21.435: INFO/TestRunner(2367): at
com.jayway.android.robotium.solo.Scroller.drag(Scroller.java:70)
08-31 15:31:21.435: INFO/TestRunner(2367): at
com.jayway.android.robotium.solo.Solo.drag(Solo.java:756)
Original comment by malliknm...@gmail.com
on 31 Aug 2010 at 7:35
try this:
int height =
solo.getCurrentActivity().getWindowManager().getDefaultDisplay().getHeight();
drag(width -30,20,height-30,height-30,40);
Original comment by renasr...@gmail.com
on 31 Aug 2010 at 8:04
[deleted comment]
According to functionality..
Original comment by renasr...@gmail.com
on 1 Sep 2010 at 4:30
It worked like charm. Awesome.
Thank you
Original comment by malliknm...@gmail.com
on 2 Sep 2010 at 1:11
Original issue reported on code.google.com by
malliknm...@gmail.com
on 30 Aug 2010 at 6:27