[TabbedPage] Add sending OnAppearing and OnDisappearing notifications
authorPiotr Czaja <p.czaja@samsung.com>
Tue, 31 Jan 2017 10:05:15 +0000 (11:05 +0100)
committerKangho Hur <kangho.hur@samsung.com>
Mon, 10 Jul 2017 02:11:18 +0000 (11:11 +0900)
Change-Id: Id8094a1a06a96934ee0c41015fd8da2c1421e4bd
Signed-off-by: Piotr Czaja <p.czaja@samsung.com>
Xamarin.Forms.Platform.Tizen/Renderers/TabbedPageRenderer.cs [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 2afacfb..dd8c44c
@@ -146,8 +146,6 @@ namespace Xamarin.Forms.Platform.Tizen
                {
                        if (_tpage.SelectedItem == null)
                                return;
-                       Element.CurrentPage = _itemToItemPage[_tpage.SelectedItem];
-
                        //detach content from view without EvasObject changes
                        if (_tcontent != null)
                        {
@@ -155,14 +153,18 @@ namespace Xamarin.Forms.Platform.Tizen
                                _tcontent.Hide();
                                //unpack content that is hiden an prepare for new content
                                _box.UnPack(_tcontent);
+                               (Element.CurrentPage as IPageController)?.SendDisappearing();
                        }
+                       Element.CurrentPage = _itemToItemPage[_tpage.SelectedItem];
+
                        //create EvasObject using renderer and remember to not destroy
-                       //it for better performance (creat once)
+                       //it for better performance (create once)
                        _tcontent = Platform.GetOrCreateRenderer(Element.CurrentPage).NativeView;
                        _tcontent.SetAlignment(-1, -1);
                        _tcontent.SetWeight(1, 1);
                        _tcontent.Show();
                        _box.PackEnd(_tcontent);
+                       (Element.CurrentPage as IPageController)?.SendAppearing();
                }
 
                void CurrentPageChanged()