aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
  • Tools
  • About
aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
  • Tools
  • About

Posts by tag

Jetpack Compose

17 posts
View Post
  • 5 min
  • Programming

Jetpack Compose — When Should I Use DerivedStateOf?

derivedStateOf — a really common question we see is where and when is the correct place to use this API? The answer to this question is <strong class="ki jk">derivedStateOf {}</strong> should be used when your state or key is changing more than you want to update your UI. Or in other words, derivedStateOf is like distinctUntilChanged from Kotlin Flows or other similar reactive frameworks. Remember that Composables recompose when the Compose state object they read, changes. derivedStateOf allows you to create a new state object that changes only as much as you need. Let’s take a look at an example. Here we have a username field and a button that enables when the…
View Post
Share
View Post
  • 6 min
  • Mobile
  • Programming

Faster Jetpack Compose View Interop With App Startup And Baseline Profile

Jetpack Compose is designed to be interoperable with an existing View-based app. This enables you to take an incremental approach to migrating your existing app’s UI to Compose. While your app is in the middle of migration, and doesn’t yet have a Composable on the home or landing screen, users might notice jank when they navigate to a screen built with Compose. This is because the Compose library is loaded only when it is used for the first time. There is one workaround that has been floating around to add a Composable pixel on the home/landing screen. This workaround ensures that Compose components are warmed…
View Post
Share
View Post
  • 5 min
  • Mobile
  • Programming

Faster Jetpack Compose View Interop With App Startup And Baseline Profile

Jetpack Compose is designed to be interoperable with an existing View-based app. This enables you to take an incremental approach to migrating your existing app’s UI to Compose. While your app is in the middle of migration, and doesn’t yet have a Composable on the home or landing screen, users might notice jank when they navigate to a screen built with Compose. This is because the Compose library is loaded only when it is used for the first time. There is one workaround that has been floating around to add a Composable pixel on the home/landing screen. This workaround ensures that Compose components are warmed…
View Post
Share
View Post
  • 4 min
  • Mobile
  • Programming

Jetpack Compose: Debugging Recomposition

In this post, I wanted to show you how I looked into a performance issue in Jetsnack and how I went about debugging and fixing it in Jetpack Compose. This post is available as a video as well if you prefer. Let’s get started by looking at the Jetsnack sample. The details screen has a fancy collapsing toolbar effect, where as we scroll up the content moves up and resizes and as we scroll back down the content returns to how it started. We’ve had reports that on lower-end devices this can appear quite janky as it scrolls. So, let’s look into…
View Post
Share
View Post
  • 3 min
  • Mobile
  • Programming

Experimenting With Jetpack Glance

We’re happy to announce that the new Jetpack Glance framework, which lets you build app widgets and wear tiles with Jetpack Compose-like code, has reached alpha-04. We also just released a standalone experimental repository to supplement Jetpack Glance with tools that are commonly required for development but not yet available. Important: This project is independent from the AndroidX Glance repository and development. The <a class="au ku" href="https://developer.android.com/reference/kotlin/androidx/glance/appwidget/GlanceRemoteViews" target="_blank" rel="noopener ugc nofollow"><em class="iy">GlanceRemoteViews</em></a> API and any of the features in the experimental repository may, in the future, change or become obsolete (and therefore likely deprecated). Why can’t these be in AndroidX? We want to iterate, explore and experiment with some…
View Post
Share
View Post
  • 7 min
  • Programming

MAD About Media

Hi everyone! I spent my summer as a Developer Relations Engineer Intern on Google’s Android DevRel team. Joining Google, I was ecstatic about the opportunity to have an impact in the developer community. In this blog post, I will be discussing modern approaches to creating Android media apps through my experience in converting the Universal Android Media Player (UAMP) media playback sample app to Compose, updating it to use modern libraries such as Media3. Starting From Scratch As someone completely new to Android development with a Java background, learning Kotlin was pleasantly trivial. Likewise, I was able to rely on…
View Post
Share
View Post
  • 6 min
  • Programming

Jetpack Compose Accompanist — An FAQ.

Accompanist is a group of libraries that aim to supplement Jetpack Compose with features that are commonly required by developers but not yet officially supported in Jetpack Compose AndroidX libraries. Accompanist is a labs-like environment for new Compose APIs. We use it to help fill known gaps in the Compose toolkit, experiment with new APIs and to gather insight into the development experience of developing a Compose library. The goal of Accompanist is to not exist. We want to upstream the libraries into the official toolkit, at which point they will be deprecated and removed from Accompanist. Currently in Accompanist you can find…
View Post
Share
View Post
  • 3 min
  • Mobile
  • Programming

Jetpack Compose 1.2 Is Now Stable!

Today, we’re releasing version 1.2 of Jetpack Compose, Android’s modern, native UI toolkit, continuing to build out our roadmap. This release contains new features like downloadable fonts, lazy grids, and improvements for tablets and Chrome OS with better focus, mouse, and input handling. Compose is our recommended way to build new Android apps for phone, tablets and foldables. Today we also released Compose for Wear OS 1.0 – making Compose the best way to build a Wear OS app as well. We continue to see developers like the Twitter engineering team ship faster using Compose: “Compose increased our productivity dramatically. It’s much easier and faster to write a Composable function…
View Post
Share
View Post
  • 8 min
  • Programming

Jetpack Compose Interop: Using Compose In A RecyclerView

TL;DR RecyclerView 1.3.0-alpha02 and Compose UI 1.2.0-beta02 bring out-of-the-box performant usage of composables from RecyclerView — no extra code required! If you had previously implemented our guidance for Compose in RecyclerView, you should now remove this code. Introducing Compose incrementally in your codebase means that you can end up in the situation when you’re using composables as items in a RecyclerView. Before Compose UI version 1.2.0-beta02, the underlying composition of a ComposeView disposes when the view detaches from the window. However, in the context of a RecyclerView, items continually detach/attach from the window as they move off/on screen. Having to dispose and recreate compositions repeatedly is expensive and…
View Post
Share
View Post
  • 12 min
  • Programming

Jetpack Compose Stability Explained

Have you ever measured the performance of your composable and discovered it is recomposing more code than you expect? “I thought Compose was meant to intelligently skip composables when state hasn’t changed?” you might ask. Or when reading Compose code you might see classes annotated with <a class="au ll" href="https://developer.android.com/reference/kotlin/androidx/compose/runtime/Stable" target="_blank" rel="noopener ugc nofollow">@Stable</a> or <a class="au ll" href="https://developer.android.com/reference/kotlin/androidx/compose/runtime/Immutable" target="_blank" rel="noopener ugc nofollow">@Immutable</a> and wonder what those mean? These concepts can be explained by Compose stability. In this blog post we will look at what Compose stability actually means, how to debug it and if you even should worry about it. TL/DR This is…
View Post
Share

Stay Connected!
LATEST
  • 1
    My First Pull Request At Age 14
    • March 24, 2023
  • 2
    AWS Chatbot Now Integrated Into Microsoft Teams
    • March 24, 2023
  • 3
    Verify POST Endpoint Availability With Uptime Checks
    • March 24, 2023
  • 4
    Sovereign Clouds Are Becoming A Big Deal Again
    • March 23, 2023
  • 5
    Ditching Google: The 3 Search Engines That Use AI To Give Results That Are Meaningful
    • March 23, 2023
  • 6
    Pythonic Techniques For Handling Sequences
    • March 21, 2023
  • 7
    Oracle Cloud Infrastructure to Increase the Reliability, Efficiency, and Simplicity of Large-Scale Kubernetes Environments at Reduced Costs
    • March 20, 2023
  • 8
    Monitor Kubernetes Cloud Costs With Open Source Tools
    • March 20, 2023
  • 9
    What Is An Edge-Native Application?
    • March 20, 2023
  • 10
    Eclipse Java Downloads Skyrocket
    • March 19, 2023
about
Hello World!

We are aster.cloud. We’re created by programmers for programmers.

Our site aims to provide guides, programming tips, reviews, and interesting materials for tech people and those who want to learn in general.

We would like to hear from you.

If you have any feedback, enquiries, or sponsorship request, kindly reach out to us at:

[email protected]
Most Popular
  • 1
    Cloudflare Takes On Online Fraud Detection Market
    • March 15, 2023
  • 2
    Linux Foundation Training & Certification & Cloud Native Computing Foundation Partner With Corise To Prepare 50,000 Professionals For The Certified Kubernetes Administrator Exam
    • March 16, 2023
  • 3
    Cloudflare Democratizes Post-Quantum Cryptography By Delivering It For Free, By Default
    • March 16, 2023
  • 4
    Daily QR “Scan Scams” Phishing Users On Their Mobile Devices
    • March 16, 2023
  • 5
    Lockheed Martin Launches Commercial Ground Control Software For Satellite Constellations
    • March 14, 2023
  • /
  • Platforms
  • Architecture
  • Engineering
  • Programming
  • Tools
  • About

Input your search keywords and press Enter.