Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

Commit

Permalink
[CirclePage]Fix Actionbutton displaying issue on Multipage (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkpu authored Apr 22, 2019
1 parent 7789e64 commit 63123b5
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Tizen.Wearable.CircularUI.Forms.Renderer/CirclePageRenderer.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void OnLayout()
var btnRect = _actionButton.Geometry;
var btnW = Math.Max(_actionButton.MinimumWidth, btnRect.Width);
var btnH = Math.Max(_actionButton.MinimumHeight, btnRect.Height);
var btnX = (rect.Width - btnW) / 2;
var btnX = rect.X + (rect.Width - btnW)/2;
var btnY = rect.Height - btnH;
_actionButton.Geometry = new Rect(btnX, btnY, btnW, btnH);
_actionButton.StackAbove(prev);
Expand All @@ -221,7 +221,7 @@ void OnLayout()

if (_moreOption != null)
{
_moreOption.Geometry = Xamarin.Forms.Platform.Tizen.Forms.NativeParent.Geometry;
_moreOption.Geometry = rect;
_moreOption.StackAbove(prev);
}
}
Expand Down
3 changes: 2 additions & 1 deletion test/WearableUIGallery/WearableUIGallery/AppViewModel.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ public AppViewModel()
new TCDescribe { Title = "Add/Move", Class = typeof(TCIndexPage) },
new TCDescribe { Title = "Add (base 1)", Class = typeof(TCIndexPageSingleStart) },
new TCDescribe { Title = "Template", Class = typeof(TCIndexPageTemplate) },
new TCDescribe { Title = "Focus", Class = typeof(TCIndexPageFocus) }
new TCDescribe { Title = "Focus", Class = typeof(TCIndexPageFocus) },
new TCDescribe { Title = "ActionButton", Class = typeof(TCIndexPageActionButton) }
}
});
TCs.Add(new TCDescribe
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8" ?>
<w:IndexPage
x:Class="WearableUIGallery.TC.TCIndexPageActionButton"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:WearableUIGallery"
xmlns:w="clr-namespace:Tizen.Wearable.CircularUI.Forms;assembly=Tizen.Wearable.CircularUI.Forms">
<w:CirclePage>
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
<Label Text="InsertText1" />
<w:PopupEntry />
</StackLayout>
<w:CirclePage.ActionButton>
<w:ActionButtonItem
x:Name="Button1"
Text="Button1"/>
</w:CirclePage.ActionButton>
</w:CirclePage>

<w:CirclePage>
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
<Label Text="InsertText2" />
<w:PopupEntry />
</StackLayout>

<w:CirclePage.ActionButton>
<w:ActionButtonItem
x:Name="Button2"
Text="Button2"/>
</w:CirclePage.ActionButton>
</w:CirclePage>

<w:CirclePage>
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
<Label Text="InsertText3" />
<w:PopupEntry />
</StackLayout>
<w:CirclePage.ActionButton>
<w:ActionButtonItem
x:Name="Button3"
Text="Button3"/>
</w:CirclePage.ActionButton>
</w:CirclePage>
</w:IndexPage>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Flora License, Version 1.1 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://floralicense.org/license/
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

using Tizen.Wearable.CircularUI.Forms;
using Xamarin.Forms.Xaml;

namespace WearableUIGallery.TC
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class TCIndexPageActionButton : IndexPage
{
public TCIndexPageActionButton()
{
InitializeComponent();
}
}
}

0 comments on commit 63123b5

Please sign in to comment.