You can also hide the video by dragging it to the left or right edge of your display. Tap the arrow button to make the video reappear. Use multitasking on your iPad With iPadOS, you can use multitasking to work with more than one app at the same time.
Types of multitasking Apps that support multitasking can be used in a few different ways. Start multitasking You can get started with multitasking by using the Multitasking menu, the Dock, or Spotlight. How to use the Multitasking menu to open multiple iPad apps Open an app. Tap the Multitasking button at the top of the screen. Tap the Split View button or the Slide Over button.
The current app moves aside and your Home Screen appears. Tap a second app on your Home Screen. Swipe left or right to see apps on your other Home Screen pages. You can also tap an app in your Dock. If you chose Split View, the second app appears side-by-side with the current app.
If you chose Slide Over, the second app opens full-screen and the current app moves to a smaller window that you can move to the right or left side of your screen. How to use the Dock to open multiple iPad apps Open an app. Slide one finger up from the bottom edge of the screen until the Dock appears, then release. Touch and hold a second app in the Dock, then immediately drag it up out of the Dock.
If you drag the app to the left or right edge of the screen, it appears in Split View with the current app. If you let go of the app in the middle of the screen, it appears in a Slide Over window. Touch and hold one of the larger app icons, then drag it into Split View or Slide Over. To see your other apps by category, tap one of the groups of smaller app icons.
You can also tap the App Library search bar to see all your apps, then drag one of the apps into a multitasking view. Use Spotlight to open multiple apps To use Spotlight for multitasking, you need to have a keyboard, such as the Apple Magic Keyboard, connected to your iPad.
Open an app. Begin typing the name of the second app that you want to open. Touch and hold the second app's icon when it appears in Spotlight results, then immediately drag it out of Spotlight. How to open a center window on your iPad Open an app that supports center window, such as Mail or Notes. Touch and hold an individual email, note, or other item from the app's list.
Tap Open in New Window in the menu that appears. When you work on a Mac, you use multiple windows, and you can easily switch from one to another in many ways: you can click on a different window, click its Dock icon, or press Command-Tab to use the application switcher.
But on an iPad, you generally just use one app, one window at a time. Apple introduced Split Screen mode in iOS 9, and has enhanced it over the years. With most apps you use on an iPad, you see three dots, what Apple calls the Multitasking button, at the top of the screen. When you tap the Multitasking button, you see three small buttons. Tap the Split View button to split the current window. At first, it moves to the left, almost off the screen. Tap an app, and both apps will now split the screen.
If you tap and drag the center of the divider, where you can see a small white line, you can resize the windows. If you want to return to full screen view, tap the Multitasking button, then tap the leftmost button that displays to return to full screen.
Slide Over is different from Split View; instead of windows being equal, with a divider between them, Slide Over opens the second window above the first, as a sort of floating window.
In the above screenshot, if I wanted to turn the App Store window, which is on the right, into a Slide Over window, I could tap the Multitasking button, then the Slide Over button. An activity should check the current display in onCreate and onConfigurationChanged if handling the configuration change. Make sure to update the resources and layouts when the display changes. If the selected launch mode for an activity allows multiple instances, launching on a secondary screen can create a new instance of the activity.
Both activities will be resumed at the same time. Figure 3. Multiple instances of an activity on multiple displays. You may also want to read about the multi-display APIs that were introduced in Android 8. Using the right context is crucial in multi-display.
When accessing resources, the activity context which is displayed is different from the application context which is not. The activity context contains information about the display and is always adjusted for the display area in which the activity appears.
This enables you to get the correct information about the display density or window metrics your app currently has. You should always be using the activity context or another UI-based context to get information about the current window or display. This also affects some system APIs that use information from the context for example, see Toasts overview.
The activity window configuration and parent display define resources and context. Get the current display as follows:. The maximum window metrics are for making calculations, layout choices, or determining the size of resources to fetch ahead of time. Having this available in onCreate enables you to make these decisions before the first layout pass.
These metrics should not be used for laying out specific view elements; instead use information from the Configuration object. Foldable devices might have different cutout geometry when folded and unfolded. To avoid cutout issues read Best practices for display cutout support. You can get the available displays from the DisplayManager system service:.
Use the Display class to get information about a particular display, such as the display size or flags that indicate whether a display is secure. However, do not assume that the display size is going to be the same as the display area allocated to your application.
Remember that in multi-window mode, your application occupies a portion of the display. A keyboard can be shown on a secondary screen if the display is configured to support system decorations.
The input method editor automatically appears if a text field requests input on that display. Figure 4. Keyboard on a secondary display. In Android 10 API level 29 , secondary screens can have wallpaper. The framework creates a separate instance of WallpaperService. Engine for each display. Make sure the surface of each engine is drawn independently. Developers can load assets using the display context in WallpaperService. Engine getDisplayContext.
Also, make sure your WallpaperInfo. Figure 5. Wallpaper on phone and secondary display. Instances of the activity are used on all displays that support system decorations, one per each display. The activity must have a launch mode that does not prevent multiple instances and that can adapt to different screen sizes.
The launch mode cannot be singleInstance or singleTask. Figure 6. Material Design launcher on a phone. Figure 7. Material Design launcher on a secondary display. Android 11 API level 30 introduced the following WindowManager methods to provide the bounds of apps running in multi-window mode:. If your app targets Android 7. You can set attributes in your manifest to control both size and layout. A root activity's attribute settings apply to all activities within its task stack.
If this will break your app, you can use filters to restrict your app's availability on such devices. Note: If you build a multi-orientation app that targets API level 23 or lower, and the user uses the app in multi-window mode, the system forcibly resizes the app. The system presents a dialog box warning the user that the app may behave unexpectedly.
The system does not resize fixed-orientation apps; if the user attempts to open a fixed-orientation app under multi-window mode, the app takes over the whole screen. Android 12 API level 31 defaults to multi-window mode. If this attribute is set to true, the activity can be launched in split-screen and free-form modes. If the attribute is set to false, the activity does not support multi-window mode. If this value is false, and the user attempts to launch the activity in multi-window mode, the activity takes over the full screen.
If your app targets API level 24 or higher, but you do not specify a value for this attribute, the attribute's value defaults to true. If your app targets API level 31 or higher, this attribute works differently on small and large screens:. After adding android:configChanges , your activity and fragments receive a callback to onConfigurationChanged instead of being destroyed and recreated.
You can then manually update your views, reload resources, and perform other operations as needed. With Android 7. The following code shows how to specify an activity's default size and location and its minimum size when the activity is displayed in free-form mode:. Beginning with Android 7. Some system UI customization options are disabled; for example, apps cannot hide the status bar if they are running in multi-window mode see Control the system UI visibility.
The system ignores changes to the android:screenOrientation attribute. The Activity class offers the following methods to support multi-window display:. The Fragment class exposes versions of many of these methods; for example, Fragment.
To put an activity in picture-in-picture mode, call enterPictureInPictureMode This method has no effect if the device does not support picture-in-picture mode. For more information, see Picture-in-picture support. When you launch a new activity, you can indicate that the new activity should be displayed adjacent to the current one if possible. The system makes a best effort to do this, but it is not guaranteed to happen. If a device is in free-form mode and you are launching a new activity, you can specify the new activity's dimensions and screen location by calling ActivityOptions.
This method has no effect if the device is not in multi-window mode. On API level 30 and lower, if you launch an activity within a task stack, the activity replaces the activity on the screen, inheriting all of its multi-window properties. If you want to launch the new activity as a separate window in multi-window mode, you must launch it in a new task stack.
Android 12 API level 31 enables apps to split an application's task window among multiple activities. You determine how your app displays its activities — full screen, side by side, or stacked — by creating an XML configuration file or making Jetpack WindowManager API calls. Users can drag and drop data from one activity to another while the two activities are sharing the screen.
Prior to Android 7. To quickly add support for accepting dropped content in editable TextView widgets, see the OnReceiveContentListener interface. Each root activity has its own task, which runs on a separate process and is displayed in its own window. You can combine this with some of the multi-window attributes to request a specific location for the new window. For example, a shopping app can display multiple windows to compare products. Android 12 API level 31 enables you to launch two instances of an activity side by side in the same task window.
Note that when multiple instances are running in separate windows on a foldable device, one or more instances might be sent to the background if the posture changes.
For example, assume a device is unfolded and has two app instances running in two windows on either side of the fold. If the device is folded, one of the instances might be terminated instead of trying to fit the windows for both instances on a smaller screen.
Whether or not your app targets API level 24 or higher, you should verify how it behaves in multi-window mode in case a user tries to launch it in multi-window mode on a device running Android 7. When users attempt to use the app in multi-window mode, the system forcibly resizes the app unless the app declares a fixed orientation. If your app does not declare a fixed orientation, you should launch your app on a device running Android 7.
Verify that the user experience is acceptable when the app is forcibly resized. If the app declares a fixed orientation, you should attempt to put the app in multi-window mode. Verify that when you do so, the app remains in full screen mode. If your app targets API levels 24 through 30 and does not disable multi-window support, verify the following behavior under both split-screen and free-form modes:. If your app targets API level 31 or higher and the main activity's minimum width and minimum height are less than or equal to the respective dimensions of the available display area, verify all the behaviors listed for API levels 24 through Note: You can programmatically determine whether your app is in multi-window mode by checking the return value of Activity isInMultiWindowMode.
To verify your app's performance in multi-window mode, try the following operations. You should try these operations in both split-screen and free-form mode, except where otherwise noted. Verify that when you do so, the app remains in full-screen mode. For further information about multi-window support in Android, see: 5 tips for preparing for multi-window in Android N Android MultiWindowPlayground sample.
Content and code samples on this page are subject to the licenses described in the Content License. App Basics. Build your first app. App resources. Resource types. App manifest file. Device compatibility. Multiple APK support.
Tablets, large screens, and foldables. Build responsive UIs.
0コメント