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

Adds CircleSurfaceView #258

Merged
merged 1 commit into from
Mar 25, 2020
Merged

Conversation

rookiejava
Copy link
Contributor

@rookiejava rookiejava commented Mar 19, 2020

Description of Change

This PR adds CircleSurfaceView that can have several CircleSurfaceItems as a View not Page.

Bugs Fixed

None

API Changes

Added:

  • class CircleSurfaceView

Behavioral Changes

So, now you can draw several circle objects (CircleProgressBar and CircleSlider) on CircleSurfaceView and just add it to any Page (even if it is not CirclePage) you desired.

Usage

You can create CircleSurfaceView in the same way as other views and then place it on the desired Layout and Page (even it it is not CirclePage) and use it as shown below.

By default. the initial value of CircleSurfaceView's size(width, height) is 0. Make sure that using whether WidthRequest. HeightRequest properties or LayoutBounds or LayoutOptions like FillAndExpand to request the size of CircleSurfaceView.

  • XAML
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:tizen="clr-namespace:Xamarin.Forms.PlatformConfiguration.TizenSpecific;assembly=Xamarin.Forms.Core"
             xmlns:cu="clr-namespace:Tizen.Wearable.CircularUI.Forms;assembly=Tizen.Wearable.CircularUI.Forms"
             x:Class="MyPage">
   <ContentPage.Content>
        <AbsoluteLayout>
            <cu:CircleSurfaceView AbsoluteLayout.LayoutBounds="0,0,1,1" AbsoluteLayout.LayoutFlags="All">
                <cu:CircleSurfaceView.CircleSurfaceItems>
                    <cu:CircleProgressBarSurfaceItem
                                         BarColor="#3F3F46"
                                         BarRadius="130"
                                         BarLineWidth="28"
                                         BarAngleOffset="236.25"
                                         Value="0.6875"
                                         BackgroundColor="#00FFFFFF"
                                         IsVisible="true"/>
                    <cu:CircleProgressBarSurfaceItem
                                         BarColor="#1EDE7D"
                                         BarRadius="130"
                                         BarLineWidth="16"
                                         BarAngleOffset="237"
                                         Value="0.025"
                                         BackgroundColor="#00FFFFFF"
                                         IsVisible="true"/>
                </cu:CircleSurfaceView.CircleSurfaceItems>
            </cu:CircleSurfaceView>
        </AbsoluteLayout>
    </ContentPage.Content>
</ContentPage>

The result screenshot of the example code above is as follows.

@rookiejava rookiejava requested review from myroot and shyunMin March 19, 2020 05:04
@rookiejava rookiejava added the enhancement New feature or request label Mar 19, 2020
@rookiejava rookiejava force-pushed the circle-surface-view branch from 662557f to 8314bc8 Compare March 19, 2020 09:08
@rookiejava rookiejava merged commit 2c6ee50 into Samsung:master Mar 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants