+
+int UtcDaliItemViewOvershootVertical(void)
+{
+ ToolkitTestApplication application;
+ Dali::Stage stage = Dali::Stage::GetCurrent();
+
+ // Create the ItemView actor
+ TestItemFactory factory;
+ ItemView view = ItemView::New(factory);
+
+ // Create a grid layout and add it to ItemView
+ ItemLayoutPtr gridLayout = DefaultItemLayout::New( DefaultItemLayout::GRID );
+ view.AddLayout(*gridLayout);
+ stage.Add(view);
+
+ // Activate the grid layout so that the items will be created and added to ItemView
+ Vector3 stageSize(stage.GetSize());
+ view.ActivateLayout(0, stageSize, 0.5f);
+
+ view.SetProperty( Scrollable::Property::OVERSHOOT_ENABLED, true );
+ DALI_TEST_EQUALS( view.GetProperty(Scrollable::Property::OVERSHOOT_ENABLED).Get<bool>(), true, TEST_LOCATION );
+
+ view.SetProperty( Scrollable::Property::OVERSHOOT_SIZE, Vector2(30, 30) );
+
+ Wait(application);
+
+ // Do a pan starting from 100,100 and moving down
+ Vector2 pos(100.0f, 100.0f);
+ SendPan(application, Gesture::Possible, pos);
+ SendPan(application, Gesture::Started, pos);
+ pos.y += 5.0f;
+ Wait(application, 100);
+
+ for(int i = 0;i<200;i++)
+ {
+ SendPan(application, Gesture::Continuing, pos);
+ pos.y += 5.0f;
+ Wait(application);
+ }
+
+ SendPan(application, Gesture::Finished, pos);
+ Wait(application, 100);
+
+ // Do a pan starting from 100,100 and moving up
+ pos = Vector2(100.0f, 300.0f);
+ SendPan(application, Gesture::Possible, pos);
+ SendPan(application, Gesture::Started, pos);
+ pos.y -= 5.0f;
+ Wait(application, 100);
+
+ for(int i = 0;i<200;i++)
+ {
+ SendPan(application, Gesture::Continuing, pos);
+ pos.y -= 5.0f;
+ Wait(application);
+ }
+
+ SendPan(application, Gesture::Finished, pos);
+ Wait(application, 100);
+ END_TEST;
+}
+
+int UtcDaliItemViewOvershootHorizontal(void)
+{
+ ToolkitTestApplication application;
+ Dali::Stage stage = Dali::Stage::GetCurrent();
+
+ // Create the ItemView actor
+ TestItemFactory factory;
+ ItemView view = ItemView::New(factory);
+
+ // Create a grid layout and add it to ItemView
+ ItemLayoutPtr gridLayout = DefaultItemLayout::New( DefaultItemLayout::SPIRAL );
+ view.AddLayout(*gridLayout);
+ stage.Add(view);
+
+ // Activate the grid layout so that the items will be created and added to ItemView
+ Vector3 stageSize(stage.GetSize());
+ view.ActivateLayout(0, stageSize, 0.5f);
+
+ view.SetProperty( Scrollable::Property::OVERSHOOT_ENABLED, true );
+ DALI_TEST_EQUALS( view.GetProperty(Scrollable::Property::OVERSHOOT_ENABLED).Get<bool>(), true, TEST_LOCATION );
+
+ view.SetProperty( Scrollable::Property::OVERSHOOT_SIZE, Vector2(30, 30) );
+
+ Wait(application);
+
+ // Do a pan starting from 100,100 and moving left
+ Vector2 pos(100.0f, 100.0f);
+ SendPan(application, Gesture::Possible, pos);
+ SendPan(application, Gesture::Started, pos);
+ pos.x -= 5.0f;
+ Wait(application, 100);
+
+ for(int i = 0;i<200;i++)
+ {
+ SendPan(application, Gesture::Continuing, pos);
+ pos.x -= 5.0f;
+ Wait(application);
+ }
+
+ SendPan(application, Gesture::Finished, pos);
+ Wait(application, 100);
+
+ // Do a pan starting from 100,100 and moving right
+ pos = Vector2(100.0f, 100.0f);
+ SendPan(application, Gesture::Possible, pos);
+ SendPan(application, Gesture::Started, pos);
+ pos.x += 5.0f;
+ Wait(application, 100);
+
+ for(int i = 0;i<200;i++)
+ {
+ SendPan(application, Gesture::Continuing, pos);
+ pos.x += 5.0f;
+ Wait(application);
+ }
+
+ SendPan(application, Gesture::Finished, pos);
+ Wait(application, 100);
+
+ END_TEST;
+}