{"id":5382,"date":"2014-04-03T17:30:16","date_gmt":"2014-04-03T15:30:16","guid":{"rendered":"http:\/\/blogs.wittwer.fr\/whiler\/?p=5382"},"modified":"2023-03-12T14:42:03","modified_gmt":"2023-03-12T13:42:03","slug":"fenetres-multiples","status":"publish","type":"post","link":"https:\/\/blogs.wittwer.fr\/whiler\/2014\/04\/03\/fenetres-multiples\/","title":{"rendered":"Fen\u00eatres multiples"},"content":{"rendered":"<p>Certains p\u00e9riph\u00e9riques Android permettent d&rsquo;afficher plusieurs applications sur un m\u00eame \u00e9cran. C&rsquo;est le support du multi-fen\u00eatres.<\/p>\n<p>Il existe diff\u00e9rents types de gestionnaire multi-fen\u00eatres&nbsp;:<\/p>\n<ul>\n<li>ceux qui sont tol\u00e9rants et vous proposent l&rsquo;ensemble de vos applications<\/li>\n<li>ceux qui contr\u00f4lent que l&rsquo;application a \u00e9t\u00e9 cod\u00e9e pour<\/li>\n<\/ul>\n<p>Dans cet article je vais m&rsquo;int\u00e9resser exclusivement \u00e0 la seconde cat\u00e9gorie car c&rsquo;est celle-ci qui n\u00e9cessite que l&rsquo;on modifie le fichier <strong><em>AndroidManifest.xml<\/em><\/strong> de son application Android pour pouvoir \u00eatre affich\u00e9 ainsi.<\/p>\n<div id=\"attachment_5383\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a title=\"\u00c9cran partag\u00e9\" href=\"\/whiler\/wp-content\/uploads\/2014\/04\/wMultiWindows1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-5383\" src=\"\/whiler\/wp-content\/uploads\/2014\/04\/wMultiWindows1-300x168.png\" alt=\"\u00c9cran partag\u00e9\" width=\"300\" height=\"168\" class=\"size-medium wp-image-5383\" srcset=\"https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2014\/04\/wMultiWindows1-300x168.png 300w, https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2014\/04\/wMultiWindows1-1024x576.png 1024w, https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2014\/04\/wMultiWindows1.png 1920w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-5383\" class=\"wp-caption-text\">\u00c9cran partag\u00e9<\/p><\/div>\n<p><!--more--><br \/>\nLa ou les activit\u00e9s qui peuvent s&rsquo;afficher en multi-fen\u00eatres doivent ajouter une cat\u00e9gorie sp\u00e9cifique dans leur filtre d&rsquo;<em>intent<\/em>&nbsp;: <code class=\"codecolorer xml dawn\"><span class=\"xml\"><span class=\"sc3\"><span class=\"re1\">&lt;category<\/span> <span class=\"re0\">android:name<\/span>=<span class=\"st0\">&quot;android.intent.category.MULTIWINDOW_LAUNCHER&quot;<\/span> <span class=\"re2\">\/&gt;<\/span><\/span><\/span><\/code><\/p>\n<p>Par exemple&nbsp;:<\/p>\n<div class=\"codecolorer-container xml dawn\" style=\"overflow:auto;white-space:nowrap;width:480px;\"><div class=\"xml codecolorer\">&nbsp; &nbsp; &nbsp; &nbsp; <span class=\"re1\">&lt;activity<\/span> <span class=\"re0\">android:name<\/span>=<span class=\"st0\">&quot;Home&quot;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"re0\">android:label<\/span>=<span class=\"st0\">&quot;@string\/app_name&quot;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"re0\">android:launchMode<\/span>=<span class=\"st0\">&quot;singleTask&quot;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"re0\">android:allowBackup<\/span>=<span class=\"st0\">&quot;true&quot;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"re0\">android:allowClearUserData<\/span>=<span class=\"st0\">&quot;true&quot;<\/span><span class=\"re2\">&gt;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"re1\">&lt;intent-filter<span class=\"re2\">&gt;<\/span><\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"re1\">&lt;action<\/span> <span class=\"re0\">android:name<\/span>=<span class=\"st0\">&quot;android.intent.action.MAIN&quot;<\/span> <span class=\"re2\">\/&gt;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"re1\">&lt;category<\/span> <span class=\"re0\">android:name<\/span>=<span class=\"st0\">&quot;android.intent.category.LAUNCHER&quot;<\/span> <span class=\"re2\">\/&gt;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"re1\">&lt;category<\/span> <span class=\"re0\">android:name<\/span>=<span class=\"st0\">&quot;android.intent.category.MULTIWINDOW_LAUNCHER&quot;<\/span> <span class=\"re2\">\/&gt;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class=\"re1\">&lt;\/intent-filter<span class=\"re2\">&gt;<\/span><\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; <span class=\"re1\">&lt;\/activity<span class=\"re2\">&gt;<\/span><\/span><\/div><\/div>\n<p>&nbsp;<br \/>\nIl faut \u00e9galement ajouter dans la balise <code class=\"codecolorer xml dawn\"><span class=\"xml\"><span class=\"re1\">&lt;application<\/span> <span class=\"re2\">\/&gt;<\/span><\/span><\/code> les deux balises suivantes&nbsp;:<\/p>\n<div class=\"codecolorer-container xml dawn\" style=\"overflow:auto;white-space:nowrap;width:480px;\"><div class=\"xml codecolorer\">&nbsp; &nbsp; &nbsp; &nbsp; <span class=\"re1\">&lt;uses-library<\/span> <span class=\"re0\">android:name<\/span>=<span class=\"st0\">&quot;com.sec.android.app.multiwindow&quot;<\/span> <span class=\"re0\">android:required<\/span>=<span class=\"st0\">&quot;false&quot;<\/span> <span class=\"re2\">\/&gt;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; <span class=\"re1\">&lt;meta-data<\/span> <span class=\"re0\">android:name<\/span>=<span class=\"st0\">&quot;com.sec.android.support.multiwindow&quot;<\/span> <span class=\"re0\">android:value<\/span>=<span class=\"st0\">&quot;true&quot;<\/span> <span class=\"re2\">\/&gt;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"re1\">&lt;\/application<span class=\"re2\">&gt;<\/span><\/span><\/div><\/div>\n<p><div id=\"attachment_5389\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a title=\"Partage d'\u00e9cran horizontal\" href=\"\/whiler\/wp-content\/uploads\/2014\/04\/wMultiWindows2.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-5389\" src=\"\/whiler\/wp-content\/uploads\/2014\/04\/wMultiWindows2-300x168.png\" alt=\"Partage d&#039;\u00e9cran horizontal\" width=\"300\" height=\"168\" class=\"size-medium wp-image-5389\" srcset=\"https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2014\/04\/wMultiWindows2-300x168.png 300w, https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2014\/04\/wMultiWindows2-1024x576.png 1024w, https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2014\/04\/wMultiWindows2.png 1920w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-5389\" class=\"wp-caption-text\">Partage d&rsquo;\u00e9cran horizontal<\/p><\/div><br \/>\n<div id=\"attachment_5393\" style=\"width: 178px\" class=\"wp-caption aligncenter\"><a title=\"Partage d'\u00e9cran vertical\" href=\"\/whiler\/wp-content\/uploads\/2014\/04\/wMultiWindows3.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-5393\" src=\"\/whiler\/wp-content\/uploads\/2014\/04\/wMultiWindows3-168x300.png\" alt=\"Partage d&#039;\u00e9cran vertical\" width=\"168\" height=\"300\" class=\"size-medium wp-image-5393\" srcset=\"https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2014\/04\/wMultiWindows3-168x300.png 168w, https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2014\/04\/wMultiWindows3-576x1024.png 576w, https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/uploads\/2014\/04\/wMultiWindows3.png 1080w\" sizes=\"auto, (max-width: 168px) 100vw, 168px\" \/><\/a><p id=\"caption-attachment-5393\" class=\"wp-caption-text\">Partage d&rsquo;\u00e9cran vertical<\/p><\/div><\/p>\n<p>Des param\u00e8tres optionnels sont \u00e9galement disponibles pour sp\u00e9cifier diff\u00e9rentes dimensions&nbsp;:<\/p>\n<div class=\"codecolorer-container xml dawn\" style=\"overflow:auto;white-space:nowrap;width:480px;\"><div class=\"xml codecolorer\"><span class=\"re1\">&lt;meta-data<\/span> <span class=\"re0\">android:name<\/span>=<span class=\"st0\">&quot;com.sec.android.multiwindow.DEFAULT_SIZE_W&quot;<\/span> <span class=\"re0\">android:value<\/span>=<span class=\"st0\">&quot;LARGEUR_SOUHAITEE&quot;<\/span> <span class=\"re2\">\/&gt;<\/span><br \/>\n<span class=\"re1\">&lt;meta-data<\/span> <span class=\"re0\">android:name<\/span>=<span class=\"st0\">&quot;com.sec.android.multiwindow.DEFAULT_SIZE_H&quot;<\/span> <span class=\"re0\">android:value<\/span>=<span class=\"st0\">&quot;HAUTEUR_SOUHAITEE&quot;<\/span> <span class=\"re2\">\/&gt;<\/span><br \/>\n<span class=\"re1\">&lt;meta-data<\/span> <span class=\"re0\">android:name<\/span>=<span class=\"st0\">&quot;com.sec.android.multiwindow.MINIMUM_SIZE_W&quot;<\/span> <span class=\"re0\">android:value<\/span>=<span class=\"st0\">&quot;LARGEUR_MINIMALE&quot;<\/span> <span class=\"re2\">\/&gt;<\/span><br \/>\n<span class=\"re1\">&lt;meta-data<\/span> <span class=\"re0\">android:name<\/span>=<span class=\"st0\">&quot;com.sec.android.multiwindow.MINIMUM_SIZE_H&quot;<\/span> <span class=\"re0\">android:value<\/span>=<span class=\"st0\">&quot;HAUTEUR_MINIMALE&quot;<\/span> <span class=\"re2\">\/&gt;<\/span><\/div><\/div>\n<p>Si vous souhaitez que votre application d\u00e9velopp\u00e9e avec <a href=\"https:\/\/www.embarcadero.com\/fr\/products\/rad-studio\/fm-application-platform\" title=\"Page web de FireMonkey\" target=\"_blank\" rel=\"noopener\">FireMonkey<\/a> puisse b\u00e9n\u00e9ficier de cette fonctionnalit\u00e9, il faudra tout simplement modifier votre fichier <strong><em>AndroidManifest.template.xml<\/em><\/strong> qui se situe \u00e0 la racine de votre projet en ajoutant les lignes sp\u00e9cifi\u00e9es pr\u00e9c\u00e9demment.<\/p>\n<p>Comme toujours, si vous avez des questions, n&rsquo;h\u00e9sitez pas&nbsp;!  <img src=\"https:\/\/blogs.wittwer.fr\/whiler\/wp-includes\/images\/smilies\/skype\/\/wink.gif\" alt=\";)\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/> <\/p>\n<div class=\"thanks_button_div\" \n                  style=\"float: right; margin-right: 10px; margin-top:10px;\"><div id=\"thanksButtonDiv_5382_1\" style=\"background-image:url(https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/plugins\/thanks-you-counter-button\/images\/thanks_compact_brown1.png); background-repeat:no-repeat; float: left; display: inline;\"\n                onmouseover=\"javascript:thankYouChangeButtonImage('thanksButtonDiv_5382_1', true);\" \n                onmouseout=\"javascript:thankYouChangeButtonImage('thanksButtonDiv_5382_1', false);\"\n                onclick=\"javascript:thankYouChangeButtonImage('thanksButtonDiv_5382_1', false);\" >\n                <input type=\"button\" onclick=\"thankYouButtonClick(5382, 'You left &ldquo;Thanks&rdquo; already for this post')\" value=\"Merci\u00a0 3\"\n                  class=\"thanks_button thanks_compact thanks_brown1\"\n                  style=\"  font-family: Verdana, Arial, Sans-Serif; font-size: 14px; font-weight: normal;; color:#00f;\"\n                  id=\"thanksButton_5382_1\" title=\"Click to leave &ldquo;Thanks&rdquo; for this post\"\/>\n             <\/div><div id=\"ajax_loader_5382_1\" style=\"display:inline;visibility: hidden;\"><img decoding=\"async\" alt=\"ajax loader\" src=\"https:\/\/blogs.wittwer.fr\/whiler\/wp-content\/plugins\/thanks-you-counter-button\/images\/ajax-loader.gif\" \/><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Certains p\u00e9riph\u00e9riques Android permettent d\u2019afficher plusieurs applications sur un m\u00eame \u00e9cran. C\u2019est le support du multi-fen\u00eatres.<\/p>\n<p>Il existe diff\u00e9rents types de gestionnaire multi-fen\u00eatres :<br \/>\n&#8211;    ceux qui sont tol\u00e9rants et vous proposent l\u2019ensemble de vos applications<br \/>\n&#8211;    ceux qui contr\u00f4lent que l\u2019application a \u00e9t\u00e9 cod\u00e9e pour<\/p>\n<p>Dans cet article je vais m\u2019int\u00e9resser exclusivement \u00e0 la seconde cat\u00e9gorie car c\u2019est celle-ci qui n\u00e9cessite que l\u2019on modifie le fichier AndroidManifest.xml de son application Android pour pouvoir \u00eatre affich\u00e9 ainsi.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[132,7],"tags":[158,154,146],"class_list":["post-5382","post","type-post","status-publish","format-standard","hentry","category-android","category-delphi","tag-android","tag-delphi","tag-firemonkey"],"_links":{"self":[{"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/posts\/5382","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/comments?post=5382"}],"version-history":[{"count":1,"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/posts\/5382\/revisions"}],"predecessor-version":[{"id":6321,"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/posts\/5382\/revisions\/6321"}],"wp:attachment":[{"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/media?parent=5382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/categories?post=5382"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.wittwer.fr\/whiler\/wp-json\/wp\/v2\/tags?post=5382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}