Skip to content

Commit

Permalink
[Tizen] Fix Compatibility and Controls.Sample build error
Browse files Browse the repository at this point in the history
  • Loading branch information
rookiejava committed Oct 19, 2021
1 parent db93418 commit 09f22ee
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Microsoft.Maui.Controls.PlatformConfiguration.TizenSpecific;
using EColor = ElmSharp.Color;
using ERect = ElmSharp.Rect;
using EToolbar = ElmSharp.Toolbar;
using EToolbarItem = ElmSharp.ToolbarItem;
using EToolbarItemEventArgs = ElmSharp.ToolbarItemEventArgs;

Expand All @@ -17,7 +18,7 @@ public class TabbedPageRenderer : VisualElementRenderer<TabbedPage>
Box _outterLayout;
Box _innerBox;
Scroller _scroller;
Toolbar _toolbar;
EToolbar _toolbar;
Dictionary<EToolbarItem, Page> _itemToItemPage = new Dictionary<EToolbarItem, Page>();
List<EToolbarItem> _toolbarItemList = new List<EToolbarItem>();
bool _isResettingToolbarItems = false;
Expand Down Expand Up @@ -52,7 +53,7 @@ protected override void OnElementChanged(ElementChangedEventArgs<TabbedPage> e)
_outterLayout.Show();

//Create toolbar that is placed inside the _outterLayout
_toolbar = new Toolbar(Forms.NativeParent)
_toolbar = new EToolbar(Forms.NativeParent)
{
AlignmentX = -1,
WeightX = 1,
Expand Down
3 changes: 2 additions & 1 deletion src/Compatibility/Core/src/Tizen/Shell/ShellTabs.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using ElmSharp;
using EToolbar = ElmSharp.Toolbar;

namespace Microsoft.Maui.Controls.Compatibility.Platform.Tizen
{
public class ShellTabs : Toolbar, IShellTabs
public class ShellTabs : EToolbar, IShellTabs
{

ShellTabsType _type;
Expand Down
5 changes: 3 additions & 2 deletions src/Compatibility/Core/src/Tizen/ThemeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using EProgressBar = ElmSharp.ProgressBar;
using ESize = ElmSharp.Size;
using ESlider = ElmSharp.Slider;
using EToolbar = ElmSharp.Toolbar;
using EToolbarItem = ElmSharp.ToolbarItem;
using Index = ElmSharp.Index;

Expand Down Expand Up @@ -473,13 +474,13 @@ public static NaviItem SetTabBarStyle(this NaviItem item)
#endregion

#region Toolbar
public static Toolbar SetNavigationBarStyle(this Toolbar toolbar)
public static EToolbar SetNavigationBarStyle(this EToolbar toolbar)
{
toolbar.Style = ThemeConstants.Toolbar.Styles.NavigationBar;
return toolbar;
}

public static Toolbar SetTVTabBarWithTitleStyle(this Toolbar toolbar)
public static EToolbar SetTVTabBarWithTitleStyle(this EToolbar toolbar)
{
if (Device.Idiom != TargetIdiom.TV)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ protected override SkiaGraphicsView CreateNativeView()
{
#if __ANDROID__
return new SkiaGraphicsView(Context);
#elif TIZEN
return new SkiaGraphicsView(NativeParent);
#else
return new SkiaGraphicsView();
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ protected override SkiaGraphicsView CreateNativeView()
{
#if __ANDROID__
return new SkiaGraphicsView(Context);
#elif TIZEN
return new SkiaGraphicsView(NativeParent);
#else
return new SkiaGraphicsView();
#endif
Expand Down

0 comments on commit 09f22ee

Please sign in to comment.