Desktop windowing on Android Tablets



Desktop windowing on Android Tablets

Posted by Francesco Romano – Developer Relations Engineer on Android, and Fahd Imtiaz – Product Supervisor, Android Developer

To empower pill customers to get extra executed, we’re enhancing freeform windowing, permitting them to run a number of apps concurrently and resize home windows for optimum multitasking. As we speak, we’re excited to share that desktop windowing on Android tablets is out there in developer preview.

For app builders, the idea of Android apps working in freeform home windows has already existed with options like Samsung DeX and ChromeOS. Updating your apps to help adaptive layouts, extra strong multitasking, and adaptive inputs will guarantee your apps work properly on massive screens throughout the Android ecosystem.

Let’s discover how one can optimize your apps for desktop windowing and ship the optimum expertise to customers.

What’s desktop windowing?

Desktop windowing permits customers to run a number of apps concurrently and resize app home windows, providing a extra versatile and desktop-like expertise. This, together with a refreshed System UI and new APIs, permits customers to be much more productive and creates a extra seamless, desktop-like expertise on tablets.

In Determine 1, you may see the anatomy of the display screen with desktop windowing enabled. Issues to make word of:

    • Customers can run a number of apps side-by-side, concurrently
    • Taskbar is fastened and reveals the working apps, customers can pin apps for fast entry
    • New header bar with window controls on the high of every window which apps can customise

Desktop windowing on Android Tablets

Determine 1: Desktop windowing on a Pixel Pill.
Notice: Photos are examples and topic to vary

How can customers invoke desktop windowing?

By default, apps open in full display screen on Android tablets. To run the apps as a desktop window on Pixel Pill, press and maintain the window deal with on the high in the midst of the display screen and drag it throughout the UI, as seen in Determine 2.

As soon as you’re within the desktop area, all future apps can be launched as desktop home windows as properly.

A moving image demonstrating what completing the action 'press, hold, and drag the window handle to enter desktop windowing' looks like.

Determine 2. Press, maintain, and drag the window deal with to enter desktop windowing.
Notice: Photos are examples and topic to vary

You can too invoke desktop windowing from the menu that reveals up beneath the window deal with if you faucet/click on on it or use the keyboard shortcut meta key (Home windows, Command, or Search) + Ctrl + Down.

You may exit desktop windowing and show an app as full display screen by closing all lively home windows or by grabbing the window deal with on the high of the window and dragging the app to the highest of the display screen. You can too use the meta + H keyboard shortcut to run apps as full display screen once more.

To return to the desktop, transfer a full display screen app to the desktop area through the use of the strategies talked about above, or just faucet on the desktop area tile within the Recents display screen.

What does this imply for app builders?

Desktop windowing on Android tablets creates new alternatives in your apps, significantly round productiveness and multitasking. The chance to resize and reposition a number of app home windows permits customers to simply evaluate paperwork, reference info whereas composing emails, and multitask effectively.

By optimizing for desktop windowing, you may ship distinctive consumer experiences to match the rising demand for tablet-based productiveness. On the identical time, you will improve the general consumer expertise on tablets, making your apps extra versatile and adaptable to totally different situations.

In case your app already meets the Tier 2 (Giant Screens optimized) high quality bar within the Giant display screen app high quality tips, then there may be minimal extra optimization required! In case your app has not been optimized for giant screens but, updating it based on the Giant display screen app high quality tips turns into much more essential within the context of desktop windowing. Let’s see why:

    • Freeform resizing allows customers to resize apps to their desire for maximized productiveness. Contemplating this, builders ought to word:
        • Apps with locked orientation are freely resizable. Meaning, even when an exercise is locked to portrait orientation, customers can nonetheless resize the app to panorama orientation window. In a future replace, apps declared as non-resizable can have their UI scaled whereas holding the identical side ratio.
        • Adaptive layouts: By adapting your UI, apps have a chance to effortlessly deal with a variety of window sizes, from compact to expanded display screen layouts. In desktop windowing, apps might be resized right down to a minimal dimension of 386dp x 352dp, so be certain to leverage window dimension lessons to regulate your app’s structure, content material, and interactions to adapt to totally different window dimensions.
        • State administration: With freeform resizing, configuration modifications occur every time the window resizes, so your app ought to both deal with these configuration modifications gracefully or be sure to are preserving the app state when the OS initiates the re-creation of the app. As a reminder, customers can change the display screen density whereas your app is working, so it’s greatest to make sure that your app can deal with display screen density configuration modifications as properly.

      A moving image demonstrating how apps are fully resizable

      Determine 3. Apps with locked orientation are freely resizable.

    • Desktop windowing takes productiveness on tablets to the subsequent degree with a number of apps working concurrently. Just like cut up display screen, Desktop windowing encourages customers to have a number of home windows open. Contemplating this, builders ought to word: 
        • Multitasking help: For enhanced productiveness, customers can have two or extra apps open concurrently, and so they count on to simply share content material between apps, so add help for drag and drop gestures. Additionally, guarantee your app continues to operate accurately even when not in focus, and in case your app makes use of unique sources like digicam or microphone, the app must deal with useful resource loss gracefully when different apps purchase the useful resource. 
        • Multi-instance help: Customers can run a number of cases of your app side-by-side; for instance, a doc editor utility might enable customers to begin new paperwork whereas nonetheless with the ability to reference the already open paperwork. Apps can set this new Multi-instance property to declare that System UI ought to be proven for this app to permit it to be launched as a number of cases. Additionally word that in desktop windowing, new duties open in a brand new window, so double-check the consumer journey in case your app begins a number of duties.

      A moving image demonstrating how you can start another instance of Chrome by dragging a tab out og the app window.

      Determine 4. Begin one other occasion of Chrome by dragging a tab out of the app window.

      Notice: Photos are examples and topic to vary

      • With desktop windowing, enter strategies past contact and insets dealing with turn into much more essential for a seamless consumer expertise. 
          • Extra enter strategies (keyboard, mouse): Customers are extra seemingly to make use of your app with a wide range of enter strategies like exterior keyboards, mice, and trackpads. Examine that customers can work together easily along with your app utilizing keyboard and mouse peripherals or by way of the emulator. Builders can add help for app shortcuts and publish them utilizing the keyboard shortcuts API, which permits customers to simply view the supported app shortcuts by way of a standardized floor on Android units.
          • Insets dealing with: All apps when working in desktop windowing have a header bar, even in immersive mode. Guarantee your app’s content material is not obscured by this. The brand new header bar is reported as a caption bar in Compose (androidx.compose.basis:foundation-layout.WindowInsets.Companion.captionBar) and in Views (android.view.WindowInsets.Kind.CAPTION_BAR), which is a part of the system bars. API 35 additionally launched a brand new look kind, to make the header bar clear, to permit apps to attract customized content material inside.

Get hands-on! 

As we speak we’re saying a developer preview that gives you with an early alternative to expertise and take a look at desktop windowing. You may strive it out on Pixel Pill earlier than it’s launched to AOSP extra broadly. The preview is out there at present. Replace your Pixel Pill to the most recent Android 15 QPR1 Beta 2 launch to check out desktop windowing. In the event you don’t have a Pixel Pill useful, entry the Pixel Pill emulator in Android Studio Preview, and choose the Android 15.0 (Google APIs Pill) goal. As soon as your machine is ready up, choose Allow freeform home windows choice in Developer choices to discover the capabilities of desktop windowing and the way your app behaves inside this new surroundings.

By optimizing your apps for desktop windowing on Pixel Pill, you aren’t solely enhancing the app expertise on that particular machine but in addition future-proofing your apps for the broader Android ecosystem the place freeform windowing will turn into prevalent. We’re excited concerning the home windows of alternatives enabled by desktop windowing, and we sit up for seeing the way you adapt your apps for an enhanced consumer expertise.

We’re dedicated to bettering the desktop windowing expertise by way of future updates. Make sure that to check your app and provides us suggestions. Say tuned for extra developer guides and sources!

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles