-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix GraphicsView scaling issue * [ElmSharp] fix color type for Shell * Add NavigationStack * [Elmsharp] Add Tabs * [Elmsharp] Fix tabstype name * Fix typo error * Update Stream Image source (#81) * Fix to use Top instead _lastTop * [NUI] Update SKCanvasView/SKGLSurfaceView to use NativeImageQueue (#83) * Update SKCanvasView to use NativeImageQueue * Fix nullable * [ElmSharp] Fix Image.Measure() (#84) * Fix build error * [Elmsharp] Modify NavigationView * Adds net6.0-tizen TFM * [NUI] Fix ViewGroup layout event issue * Fix ElmSharp Ticker * [ElmSharp] Add RefreshIcon drawable * [ElmSharp] Update IRefreshIcon * [ElmSharp] Remove moving distance on RefreshIcon * [ElmSharp] Use ThemeConstants in RefreshIcon * [ElmSharp] Add RefreshLayout * Remove theme constant on common (#90) * Fix Image Load from stream * [ElmSharp] Fix refresh status when containing scrollview * [ElmSharp] Fix Refreshlayout and refresh logic * [ElmSharp] Add base GraphicsView * [ElmSharp] Update review comments and add doxygen * [ElmSharp] Remove unnecessary return statements * Fix CollectionView Measure constraint * [ElmSharp] Add events and property for cursor position * Add OnBackButtonPressed on Popup * Refactoring ViewGroup class * Fix CustomRenderingView - change nui callback method that notify size changed * [ElmSharp] Add TVNavigationDrawer and TVNavigationView * [ElmSharp] Update proprety names in TVNavigationDrawer * [NUI] Add MaterialIconDrawable and MaterialIconButton (#99) * Add MaterialIconDrawable and MaterialIconButton * Update review * Fix GraphicsView Editor/Entry * Set default size of MaterialIconButton * [NUI] Add TitleView (#101) * [NUI] Add TitleView * Update description and CollectionChanged handler * Fix SKClipperView - change nui callback method that notify size changed * Fix Common project projitems * Update SkiaSharp.View.Tizen.ScalingInfo ScalingFactor * Update MicrosoftGraphics package version * Fix NavigationStack.Remove * Update looks of GraphicsViewDrawable to react IsEnabled property * Implement CollectionView SnapPoint * Apply Build CI * Apply code review * Support key event focus navigation * Fix maximum value for Collectionview item (#113) * Fix maximum value for Collectionview item * Check the maximum value at ToScaledDP * Update ActivityIndicatorDrawable animation * Fix SliderDrawable OnTouchMove (#114) * Fix ViewHolder Selection issue * Fix Text measure * [ElmSharp] Add RadioButton * [NUI] Fix collection view (#119) * Fix size calculation code when item was added in GridlayoutManager * Fix CollectionView nullable issue * Update Header/Footer mesasure changed * Fix GraphicsView touch issue and add more MaterialIconDrawable (#120) * Update README.md * Use net6.0 and update the Microsoft.Maui.Graphics version * update build action * Update build.yml * Fix SKClipperView * Fix GraphicsView Slider * Updated MauiGraphics version to 6.0.200-preview.14.1092 (#126) * Fix Scrolled event when scrolled by snap * Fix ViewHolder layout * Fix Button Measure to reflect icon size (#129) * Fix focus navigation (#130) * Implement focus save/restore in NavigationStack (#131) * [Elmsharp] Update INavigationDrawer for FlyoutView * Update TizenFX version on NUI (#132) * Add well-known key names class (#134) * Add well-known key names class * Fix typo error * Fix test build error (#135) * [Elmshrap] Add MaterialIcon * Update Versions.prop * [ElmSharp] Fix Label.Text issue * [ElmSharp] Update propery name * Fix GraphcisView.Switch IsToggle issue (#139) * Update CollectionView header/footer measure (#141) * Update CollectionView header/footer measure * Update header/footer measure size * Add PerformanceMonitor (#140) * Fix Touch activate event * Update Microsoft.Maui.Graphcis version to 6.0.300.rc.3.1336 * Add default animation on NavigationStack (#144) * Refactor the DeviceInfo * Optimize CollectionView scrolling (#145) * Fix null issue on DidRestoreFocus (#146) * Update RefreshIcon * [NUI] Add RefreshLayout (#149) * Fix SKClipperView (#150) * Update UpdateBounds Extensions method (#151) * [ElmSharp] Apply the PublicAPIAnalyzers * [Common] Add UnitTests project for TDD * Remove platform dependency of UIExtension.Common * Fix CollectionView Scrolling user alpha function (#178) * Implement ScrollView ScrollBarVisibility.Default (#180) * Update span supported properties (#181) * Update span supported properties * Remove unnecessary if statement * [NUI] Fix SKCanvasView to use PixelBuffer instead NativeImageQueue (#179) * Fix SKCanvasView to use PixelBuffer instead NativeImageQueue * Add more TC for SkiaView * Add MeasureRequest event in ViewGroup (#182) * Dispose ScrollView in CollectionView (#184) * Fix CollectionView Dispose (#185) * Fix Drawable (#186) * Exclude virtual functions from test coverage * Adds Common.Graphics tests * Fix minor issue (#187) * Add skiasharp.nativeassets.linux for github action * Optimize CollectionView scroll (#189) * Update TizenFX version (#190) * Fix MultiTargetFramework support correctly * Add INavigationDrawer interface * Add NaigationDrawer and TVNavigationDrawer * Add tests for NavigationDrawer * Update with review feedback * Remove TVNavigationDrawer * Fix popup UI (#193) * Update NaviagtionDrawer with review feedback * Update BackdropViewGroup * Update NavigationDrawer behavior * Fix build break * Add TVNavigationDrawer * Add TVNavigationDrawer test * Create test.yml * Update test.yml * Update test.yml * Update test.yml * Update test.yml * Update test.yml * Update build.yml * Add test result summary and coverge report jobs * Update DrawerView and tests * Fix Popup key event handling (#199) * Update DrawerView * Update OpenAsync/CloseAsync method * Apply virtual dpi for tv profile * Fix CollectionView OnLayout Size issue * Update popup width ratio on horizontal * Fix CollectionView Header/Footer dispose * Keep build.yml for public github CI * Update to SKCanvasView Co-authored-by: Seungkeun Lee <sngn.lee@samsung.com> Co-authored-by: Sunghyun Min <shyun.min@samsung.com> Co-authored-by: Jay Cho <jh5.cho@samsung.com> Co-authored-by: 김성수/Common Platform Lab(SR)/Staff Engineer/삼성전자 <sung-su.kim@samsung.com> Co-authored-by: Jay Cho <chojoong@gmail.com>
- Loading branch information
1 parent
ae8270f
commit 6ac45f8
Showing
106 changed files
with
7,051 additions
and
774 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<MicrosoftMauiGraphicsVersion>6.0.300-rc.3.1336</MicrosoftMauiGraphicsVersion> | ||
<MicrosoftCodeAnalysisPublicApiAnalyzersVersion>3.3.3</MicrosoftCodeAnalysisPublicApiAnalyzersVersion> | ||
<SkiaSharpVersion>2.88.0</SkiaSharpVersion> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,144 @@ | ||
using System; | ||
using System.Diagnostics.CodeAnalysis; | ||
|
||
namespace Tizen.UIExtensions.Common | ||
{ | ||
public static partial class DeviceInfo | ||
{ | ||
public static string Profile => s_profile.Value; | ||
|
||
public static DeviceType DeviceType => s_deviceType.Value; | ||
|
||
public static int ScreenWidth => s_screenWidth.Value; | ||
|
||
public static int ScreenHeight => s_screenHeight.Value; | ||
|
||
public static int DPI => s_dpi.Value; | ||
|
||
public static double PhysicalScale => DPI / 160.0; | ||
|
||
public static Size PixelScreenSize => new Size(s_screenWidth.Value, s_screenHeight.Value); | ||
|
||
public static Size DPScreenSize => new Size((int)(s_screenWidth.Value / PhysicalScale), (int)(s_screenHeight.Value / PhysicalScale)); | ||
|
||
public static Size ScaledDPScreenSize => new Size((int)(s_screenWidth.Value / ScalingFactor), (int)(s_screenHeight.Value / ScalingFactor)); | ||
|
||
public static bool IsMobile => DeviceType == DeviceType.Mobile; | ||
|
||
public static bool IsTV => DeviceType == DeviceType.TV; | ||
|
||
public static bool IsWatch => DeviceType == DeviceType.Watch; | ||
|
||
public static bool IsRefrigerator => DeviceType == DeviceType.Refrigerator; | ||
|
||
public static bool IsIoT => DeviceType == DeviceType.IoT; | ||
|
||
[ExcludeFromCodeCoverage] | ||
[Obsolete("Use Tizen.UIExtensions.Commonm.DeviceInfo.Profie instead")] | ||
public static string GetProfile() => Profile; | ||
|
||
[ExcludeFromCodeCoverage] | ||
[Obsolete("Use Tizen.UIExtensions.Commonm.DeviceInfo.DeviceType instead")] | ||
public static DeviceType GetDeviceType() => DeviceType; | ||
|
||
static double s_scalingFactor; | ||
public static double ScalingFactor | ||
{ | ||
get | ||
{ | ||
if (s_scalingFactor == 0) | ||
{ | ||
UpdateScalingFactor(); | ||
} | ||
return s_scalingFactor; | ||
} | ||
} | ||
|
||
static DisplayResolutionUnit s_displayResolutionUnit = DisplayResolutionUnit.DP; | ||
public static DisplayResolutionUnit DisplayResolutionUnit | ||
{ | ||
get => s_displayResolutionUnit; | ||
|
||
set | ||
{ | ||
if (s_displayResolutionUnit != value) | ||
{ | ||
s_displayResolutionUnit = value; | ||
if (s_scalingFactor != 0) | ||
UpdateScalingFactor(); | ||
} | ||
} | ||
} | ||
|
||
static double s_viewPortWidth; | ||
public static double ViewPortWidth | ||
{ | ||
get => s_viewPortWidth; | ||
set | ||
{ | ||
if (s_viewPortWidth != value) | ||
{ | ||
s_viewPortWidth = value; | ||
if (DisplayResolutionUnit == DisplayResolutionUnit.VP) | ||
{ | ||
UpdateScalingFactor(); | ||
} | ||
} | ||
} | ||
} | ||
|
||
[ExcludeFromCodeCoverage] | ||
static void UpdateScalingFactor() | ||
{ | ||
var scalingFactor = 1.0; // scaling is disabled, we're using pixels as Xamarin's geometry units | ||
if (DisplayResolutionUnit == DisplayResolutionUnit.VP && ViewPortWidth > 0) | ||
{ | ||
scalingFactor = s_screenWidth.Value / ViewPortWidth; | ||
} | ||
else | ||
{ | ||
if (DisplayResolutionUnit == DisplayResolutionUnit.DP || DisplayResolutionUnit == DisplayResolutionUnit.DeviceScaledDP) | ||
{ | ||
scalingFactor = DPI / 160.0; | ||
} | ||
|
||
if (DisplayResolutionUnit == DisplayResolutionUnit.DeviceScaledPixel || DisplayResolutionUnit == DisplayResolutionUnit.DeviceScaledDP) | ||
{ | ||
var portraitSize = Math.Min(DPScreenSize.Width, DPScreenSize.Height); | ||
if (portraitSize > 2000) | ||
{ | ||
scalingFactor *= 4; | ||
} | ||
else if (portraitSize > 1000) | ||
{ | ||
scalingFactor *= 2.5; | ||
} | ||
} | ||
} | ||
s_scalingFactor = scalingFactor; | ||
#if !TEST | ||
SkiaSharp.Views.Tizen.ScalingInfo.SetScalingFactor(scalingFactor); | ||
#endif | ||
} | ||
|
||
[ExcludeFromCodeCoverage] | ||
static DeviceType ToDeviceType(this string deviceType) | ||
{ | ||
switch (deviceType) | ||
{ | ||
case "Mobile": | ||
return DeviceType.Mobile; | ||
case "TV": | ||
return DeviceType.TV; | ||
case "Wearable": | ||
return DeviceType.Watch; | ||
case "Refrigerator": | ||
return DeviceType.Refrigerator; | ||
case "TizenIOT": | ||
return DeviceType.IoT; | ||
default: | ||
return DeviceType.Unknown; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace Tizen.UIExtensions.Common | ||
{ | ||
public enum DeviceType | ||
{ | ||
Mobile, | ||
TV, | ||
Watch, | ||
Refrigerator, | ||
IoT, | ||
Unknown | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace Tizen.UIExtensions.Common | ||
{ | ||
public enum DisplayResolutionUnit | ||
{ | ||
Pixel, | ||
DeviceScaledPixel, | ||
DP, | ||
DeviceScaledDP, | ||
VP | ||
} | ||
} |
Oops, something went wrong.