Saturday, November 23, 2024

Bringing New Enter Assist to Desktop AVD


Posted by Joshua Hale – Software program Engineer

As giant screens develop into more and more vital throughout the Android app ecosystem, we’re dedicated to boost instruments to assist Android builders adapt their apps for these giant display kind elements. In doing so, we attempt to make sure that we are able to carry impactful instruments to boost the general expertise for constructing for all giant screens comparable to foldables, tablets, and Chromebooks.

During the last yr, the staff has labored on bringing Android 13 to the Desktop AVD, together with some extra enhancements to enter assist throughout the emulator. The Android 13 launch of the Desktop AVD is now accessible inside Android Studio. To check utilizing this emulator, create a brand new digital gadget.

What’s the Desktop AVD?

Android Studio comes bundled with varied digital gadgets that run on completely different API ranges and architectures. These emulators assist builders check Android apps throughout a wide range of gadgets, permitting for testing throughout completely different display sizes, kind elements, and APIs.

When an Android app runs on a Chromebook, it makes use of performance that mirrors desktop behaviors, comparable to minimizing, maximizing, or resizing to a user-specified measurement. The Desktop Android Digital System (AVD) is an emulator that permits testing in a freeform windowing mode, much like a Chromebook, to assist this performance.

For a deeper dive into the Desktop AVD, take a look at Desktop AVD in Android Studio.

Screenshot of the Desktop AVD emulator, rendering a clock app, browser window, and downloads folder in freeform windowing mode

What enhancements include the Android 13 desktop AVD?

Most laptops use a keyboard—and it’s a typical enter gadget for elevated productiveness with tablets and foldables. Previous to Android 13, the Desktop AVD relied solely on uncustomizable enter mapping constructed into Android Studio, which might trigger friction factors for customers who depend on bodily gadgets for mapped enter and shortcuts. The Android 13 launch of the Desktop AVD provides assist for widespread keyboard interactions with Android apps. Now you can check shortcuts, assist keys, and mouse assist that will help you adhere to the giant display app high quality tips.

Keyboard Shortcuts

The vast majority of apps inside Google Play are designed for cell utilization and as such don’t all the time assist keyboard interactions. In Android 13, the Desktop AVD provides assist for generally used shortcuts, comparable to Ctrl+C (Copy) and Ctrl+V (Paste). These shortcuts can be utilized when copying textual content from a TextView/Textual content composable or pasting textual content into an EditText/TextField. These shortcuts are intercepted by the system and routinely utilized.

Customized shortcuts (which aren’t intercepted by the system) are additionally included on this launch. An instance of any such shortcut: a media participant app that makes use of the Spacebar to play or pause media. You have to use the brand new {Hardware} Enter function inside Android Studio Hedgehog to make use of customized shortcuts. This can permit Android Studio to go customized shortcuts on to the emulator. If this isn’t enabled, Android Studio might eat the important thing mixture.

Assist keys

Android 13 helps extra keymappings for assist keys. These keys are mapped to controls which might be much like experiences for keyboard shortcuts on a desktop. Some examples of those assist keys embrace:

    • Esc: Dismisses pop-ups and notifications.
    • Delete / Backspace: Deletes textual content inside an EditText or TextField
    • Arrow Keys: Supplies in-app navigation (Arrow Up/Right down to scroll).

Mouse assist

Along with enhanced keyboard assist, there are extra mouse controls built-in into the Desktop AVD. Utilizing the scroll wheel sends a mouse scroll occasion to the app that has enter focus. Proper-clicking the mouse sends a right-click occasion—which can be utilized to indicate context menus if the app helps it.

The place are you able to begin?

Giant display app high quality offers steering round creating prime quality giant display apps throughout all kind elements, outlining a complete set of high quality necessities for many varieties of Android apps. Not all necessities should be met, however it’s finest apply so that you can adhere to the necessities that make sense on your apps.

Create a desktop emulator as we speak in Android Studio Hedgehog to see how your Android app responds to keyboard and mouse inputs and freeform window resizing.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles