[Property("AUTHOR", "Wenfeng Ge, wenfeng.ge@samsung.com")]
public void GetNextFocusableView_CHECK_RETURN_VALUE()
{
- CustomView customView = new CustomView("CustomView", CustomViewBehaviour.DisableSizeNegotiation);
+ MyCustomView customView = new MyCustomView("CustomView", CustomViewBehaviour.DisableSizeNegotiation);
FocusManager.Instance.SetCurrentFocusView(customView);
View view = customView.GetNextFocusableView(customView, View.FocusDirection.Up, false);
Assert.IsNotNull(view, "Should be not null");
public class MyCustomView : CustomView
{
+ private View _nextFocusView;
public View view;
public bool calculateRelayoutSizeFlag = false;
public bool childAddFlag = false;
public MyCustomView(string typeName, CustomViewBehaviour behaviour) : base(typeName, behaviour)
{
+ }\r
+\r
+ public override View GetNextFocusableView(View currentFocusedView, FocusDirection direction, bool loopEnabled)
+ {
+ if (_nextFocusView == null)\r
+ {\r
+ _nextFocusView = new View();\r
+ }
+ return _nextFocusView;
}
public override void OnCalculateRelayoutSize(DimensionType dimension)