Android Releases Graphics Shapes Library
Written by Kay Ewbank   
Thursday, 27 April 2023

The Android Wear team has released a library for creating and rendering rounded polygonal shapes. Graphics Shapes Version 1.0 can also be used to automatically animate between different shapes.

The current version is an alpha release, and can be used to work with the Polygon API to create regular or star polygons where the number of vertices is fixed. It also lets you use an optional CornerRounding parameter to say how rounded the corners should be, and to use smoothing elements for the polygon corners.

androidstudio

The API also lets you specify a morph operation to move between two polygons. The morph command will automatically calculate a “morph” shape whose progress can be set from 0 to 1 to animate between the starting and ending shapes. If you animate that progress over time, drawing the result on every frame, the result is a smooth animation between these new rounded shapes.

The new library provides a much easier alternative to using the Path API, and the developers say they thought it would be useful to provide simple creation of all kinds of rounded shapes, and that Graphics Shapes v1.0 paves the way for more advanced app design possibilities without the need for extensive coding expertise. They also say they wanted the options to be available not just for apps running on future platform versions, but also across much older releases, for the enjoyment of all developers and users. To achieve this, the new API uses Path objects internally. Path has been available since 1.0 and thus offers compatibility back as far as AndroidX itself goes.

androidstudio

More Information

Shapes Library Documentation

Related Articles

Android Studio Electric Eel Released

Android Studio Chipmunk - Cute But Increasingly Unfit For Purpose

Android Studio Bumblebee Adds Support For ADB Over WiFi

Android Studio 4.2 Released

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Rust's Rapid Rise on TIOBE Index
10/07/2024

Rust is making spectacular progress up the TIOBE index and JavaScript is also on the up and experiencing a personal best. Kotlin is maintaining its inclusion in the top 20 and the gap at the very top  [ ... ]



OpenSilver 3 Adds AI-Powered UI Designer
11/07/2024

OpenSilver 3 has been released with an AI-powered UI designer and support for VS Code. The open-source alternative to Silverlight is capable of running large, complex legacy applications, as well as n [ ... ]


More News

kotlin book

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Thursday, 27 April 2023 )