{"id":282129,"date":"2016-12-07T13:55:03","date_gmt":"2016-12-07T10:55:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=282129"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=282129","title":{"rendered":"Dual-pane \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432"},"content":{"rendered":"<h3>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435, \u0438\u043b\u0438 \u0437\u0430\u0447\u0435\u043c \u0432\u0441\u0435 \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e<\/h3>\n<p>  <\/p>\n<p>\u041d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u043c\u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 single-pane \u0438 dual-pane \u0440\u0435\u0436\u0438\u043c\u0430\u043c\u0438 \u043f\u0440\u0438 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0435 \u044d\u043a\u0440\u0430\u043d\u0430. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438, \u043c\u0435\u043d\u044f \u043d\u0435 \u0443\u0441\u0442\u0440\u043e\u0438\u043b\u0438, \u0442\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0437\u043e\u0449\u0440\u044f\u0442\u044c\u0441\u044f \u0438 \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434.  <\/p>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/3b9\/5b4\/142\/3b95b4142c55c2fef88a22ee085bf0e3.png\" alt=\"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442\" \/><\/div>\n<p>  <\/p>\n<p>\u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432 \u043d\u043e\u0442\u0430\u0446\u0438\u044f\u0445 material design \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u044d\u043a\u0440\u0430\u043d\u0430, \u043c\u0435\u0441\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e, \u0430 \u043f\u043e\u0442\u043e\u043c\u0443 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u0434\u0432\u0430 \u0440\u0435\u0436\u0438\u043c\u0430: single-pane (\u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0434\u0438\u043d \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u0441\u044f \u0432\u043d\u0438\u0437\u0443 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438) \u0438 dual\/multi-pane (\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u043c\u0438, \u0438\u0434\u0443\u0449\u0438\u043c\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438)  <\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0432\u0438\u0434\u0435\u043b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043b\u0438\u0431\u043e ViewPager, \u043b\u0438\u0431\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e Activity. \u042f \u0436\u0435 \u0440\u0435\u0448\u0438\u043b \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u0435\u0439\u0441 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432 \u043b\u0438\u0448\u044c FragmentManager \u0438 \u0434\u0432\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<p>  <\/p>\n<h3>\u041e\u0431\u0449\u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0432\u043d\u0435\u0448\u043d\u0435\u043c \u0432\u0438\u0434\u0435<\/h3>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u2014 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a \u043c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0441 backstack-\u043e\u043c. \u042f \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0435\u043b \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u043f\u0440\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0440\u043e\u0434\u0430:  <\/p>\n<p>  <\/p>\n<p><b>portrait:<\/b>   <\/p>\n<p>  <\/p>\n<p>A -&gt; A(invisible), B -&gt; A(invisible), B(invisible), C -&gt; (popBackStack) -&gt; A (invisible), B  <\/p>\n<p>  <\/p>\n<p><b>landscape:<\/b>   <\/p>\n<p>  <\/p>\n<p>A, B -&gt; A(invisible), B, C -&gt; (popBackStack) -&gt; A, B.  <\/p>\n<p>  <\/p>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u043e\u0431\u0449\u0438\u0439 \u0432\u0438\u0434 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c ViewPager \u0441 1 \u0438\u043b\u0438 2 view, \u0432\u0438\u0434\u0438\u043c\u044b\u043c\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<br \/>  \u0422\u0430\u043a \u0436\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e:  <\/p>\n<p>  <\/p>\n<ol>\n<li>\u041d\u0443\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043c\u0435\u043d\u0443 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 (\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u0448\u0435\u043b \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u0432\u043a\u043b\u0430\u0434\u043a\u0443 Drawer-\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435)<\/li>\n<li>\u041d\u0443\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430, \u0432\u0438\u0434\u0438\u043c\u043e\u0433\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <b>\u0442\u043e\u043b\u044c\u043a\u043e<\/b> \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0442\u043e\u0433\u043e, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u044b\u043c, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u0438 \u0432\u044b\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u0441\u0442\u0430\u0440\u043e\u0433\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 \u043d\u043e\u0432\u044b\u043c<\/li>\n<\/ol>\n<p>  <\/p>\n<p>  <\/p>\n<h3>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/h3>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e util-\u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0434\u0435\u043b\u0430\u044e\u0442 \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0431\u043e\u043b\u0435\u0435 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b\u043c:  <\/p>\n<p>  <\/p>\n<p><div class=\"spoiler\"><b class=\"spoiler_title\">Config<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public class Config {     public enum Orientation {         LANDSCAPE,         PORTRAIT     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Info<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public class Info implements Parcelable {     private static final byte ORIENTATION_LANDSCAPE = 0;     private static final byte ORIENTATION_PORTRAIT = 1;     @IdRes     private int generalContainer;     @IdRes     private int detailsContainer;     private Config.Orientation orientation;     public Info(Parcel in) {         this.generalContainer = in.readInt();         this.detailsContainer = in.readInt();         this.orientation = in.readByte() == ORIENTATION_LANDSCAPE ? Config.Orientation.LANDSCAPE : Config.Orientation.PORTRAIT;     }     public Info(int generalContainer, int detailsContainer, Config.Orientation orientation) {         this.generalContainer = generalContainer;         this.detailsContainer = detailsContainer;         this.orientation = orientation;     }     public int getGeneralContainer() {         return generalContainer;     }     public void setGeneralContainer(int generalConteiner) {         this.generalContainer = generalConteiner;     }     public int getDetailsContainer() {         return detailsContainer;     }     public void setDetailsContainer(int detailsContainer) {         this.detailsContainer = detailsContainer;     }     public Config.Orientation getOrientation() {         return orientation;     }     public void setOrientation(Config.Orientation orientation) {         this.orientation = orientation;     }     @Override     public int describeContents() {         return 0;     }     @Override     public void writeToParcel(Parcel dest, int flags) {         dest.writeInt(generalContainer);         dest.writeInt(detailsContainer);         dest.writeByte(orientation == Config.Orientation.LANDSCAPE ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT);     }     public static Parcelable.Creator&lt;Info&gt; CREATOR = new Creator&lt;Info&gt;() {         @Override         public Info createFromParcel(Parcel in) {             return new Info(in);         }         @Override         public Info[] newArray(int size) {             return new Info[0];         }     }; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e \u0432\u0441\u0435, \u0447\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0441\u0430\u043c\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Parcelable, \u0434\u0430\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0436\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u0435\u0432\u0430\u0439\u0441\u0430.  <\/p>\n<p>  <\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u0438\u044f callback \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0433\u043b\u0443\u0431\u0438\u043d\u044b backstack-\u0430:  <\/p>\n<p>  <\/p>\n<p><div class=\"spoiler\"><b class=\"spoiler_title\">OnBackStackChangeListener<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public interface OnBackStackChangeListener {     void onBackStackChanged(); } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<p>  <\/p>\n<h3>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430<\/h3>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u044f \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u2014 \u0442\u0430\u043a \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u0432\u0441\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0435\u0439 \u0434\u043b\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 \u043f\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u043d\u043e\u043c\u0443 \u0438\u043c getCanonicalName() \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e. \u041a\u043b\u0430\u0441\u0441 <code>State<\/code> \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 DTO \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0439, \u0431\u0443\u0434\u0443\u0447\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u043c \u0434\u043b\u044f \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u043c\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f.  <\/p>\n<p>  <\/p>\n<p><div class=\"spoiler\"><b class=\"spoiler_title\">State<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public class State implements Parcelable {     private String fragmentName;     private Fragment.SavedState fragmentState;     public State(Parcel in) {         fragmentName = in.readString();         fragmentState = in.readParcelable(Fragment.SavedState.class.getClassLoader());     }     public State(String fragmentName, Fragment.SavedState fragmentState) {         this.fragmentName = fragmentName;         this.fragmentState = fragmentState;     }     public String getFragmentName() {         return fragmentName;     }     public void setFragmentName(String fragmentName) {         this.fragmentName = fragmentName;     }     public Fragment.SavedState getFragmentState() {         return fragmentState;     }     public void setFragmentState(Fragment.SavedState fragmentState) {         this.fragmentState = fragmentState;     }     @Override     public int describeContents() {         return 0;     }     @Override     public void writeToParcel(Parcel dest, int flags) {         dest.writeString(fragmentName);         dest.writeParcelable(fragmentState, 0);     }     public static Parcelable.Creator&lt;State&gt; CREATOR = new Creator&lt;State&gt;() {         @Override         public State createFromParcel(Parcel in) {             return new State(in);         }         @Override         public State[] newArray(int size) {             return new State[0];         }     }; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<p>  <\/p>\n<p>\u0412 \u0446\u0435\u043b\u044f\u0445 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u043b\u044e\u0431\u0435\u0437\u043d\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 <code>FragmentManager.saveFragmentInstanceState(Fragment)<\/code>  <\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u0441\u0430\u043c\u043e\u0435 \u0441\u043a\u0443\u0447\u043d\u043e\u0435 \u043f\u043e\u0437\u0430\u0434\u0438, \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u043f\u0440\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430 \u043d\u0430\u0434 FragmentManager-\u043e\u043c \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432 <code>Activity.onSaveInstanceState(Bundle)<\/code> \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043e\u0440\u0438\u043d\u0442\u0430\u0446\u0438\u0438 \u2014 \u0432 onCreate.  <\/p>\n<p>  <\/p>\n<p><div class=\"spoiler\"><b class=\"spoiler_title\">MultipaneFragmentManager<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public class MultipaneFragmentManager implements Parcelable {     public static final String KEY_DUALPANE_OBJECT = &quot;net.styleru.i_komarov.core.MultipaneFragmentManager&quot;;     private static final String TAG = &quot;MultipaneFragmentManager&quot;;     private FragmentManager fragmentManager;     private OnBackStackChangeListener listenerNull = new OnBackStackChangeListener() {         @Override         public void onBackStackChanged() {         }     };     private OnBackStackChangeListener listener = listenerNull;     private LinkedList&lt;State&gt; fragmentStateList;     private Info info;     private boolean onRestoreInstanceState;     private boolean onSaveInstanceState;     public MultipaneFragmentManager(Parcel in) {         in.readList(fragmentStateList, LinkedList.class.getClassLoader());         info = in.readParcelable(Info.class.getClassLoader());         this.onRestoreInstanceState = false;         this.onSaveInstanceState = false;     }     public MultipaneFragmentManager(FragmentManager fragmentManager, Info info) {         this.fragmentManager = fragmentManager;         this.fragmentStateList = new LinkedList&lt;&gt;();         this.info = info;         onRestoreInstanceState = true;     }     public void attachFragmentManager(FragmentManager fragmentManager) {         this.fragmentManager = fragmentManager;     }     public void detachFragmentManager() {         this.fragmentManager = null;     }     public void setOrientation(Config.Orientation orientation) {         this.info.setOrientation(orientation);     }     public void add(Fragment fragment) {         this.add(fragment, true);         listener.onBackStackChanged();     }     public boolean allInLayout() {         if(info.getOrientation() == Config.Orientation.LANDSCAPE) {             if(fragmentManager.findFragmentById(info.getGeneralContainer()) != null && fragmentManager.findFragmentById(info.getDetailsContainer()) != null) {                 return true;             } else {                 return false;             }         } else {             if(getBackStackDepth() &gt; 1) {                 return true;             } else {                 return false;             }         }     }     @SuppressLint(&quot;LongLogTag&quot;)     public synchronized void replace(Fragment fragment) {         Log.d(TAG, &quot;replace called, backstack was: &quot; + fragmentStateList.size());         if(info.getOrientation() == Config.Orientation.PORTRAIT) {             if(fragmentManager.findFragmentById(info.getGeneralContainer()) != null) {                 fragmentManager.beginTransaction().remove(fragmentManager.findFragmentById(info.getGeneralContainer())).commit();                 fragmentManager.executePendingTransactions();             }             fragmentManager.beginTransaction().replace(info.getGeneralContainer(), fragment).commit();             fragmentManager.executePendingTransactions();         } else {             if(fragmentManager.findFragmentById(info.getDetailsContainer()) != null) {                 fragmentManager.beginTransaction()                         .remove(fragmentManager.findFragmentById(info.getDetailsContainer()))                         .commit();                 fragmentManager.executePendingTransactions();             }             fragmentManager.beginTransaction()                     .replace(info.getDetailsContainer(), fragment)                     .commit();         }     }     private synchronized void add(Fragment fragment, boolean addToBackStack) {         if(info.getOrientation() == Config.Orientation.PORTRAIT) {             if(fragmentManager.findFragmentById(info.getGeneralContainer()) != null) {                 if(addToBackStack) {                     saveOldestVisibleFragmentState();                 }                 fragmentManager.beginTransaction().remove(fragmentManager.findFragmentById(info.getGeneralContainer())).commit();                 fragmentManager.executePendingTransactions();             }             fragmentManager.beginTransaction().replace(info.getGeneralContainer(), fragment).commit();             fragmentManager.executePendingTransactions();         } else if(fragmentManager.findFragmentById(info.getGeneralContainer()) == null) {             fragmentManager.beginTransaction().replace(info.getGeneralContainer(), fragment).commit();             fragmentManager.executePendingTransactions();         } else if(fragmentManager.findFragmentById(info.getDetailsContainer()) == null) {             fragmentManager.beginTransaction().replace(info.getDetailsContainer(), fragment).commit();             fragmentManager.executePendingTransactions();         } else {             if(addToBackStack) {                 saveOldestVisibleFragmentState();             }             saveDetailsFragmentState();             fragmentManager.beginTransaction()                     .remove(fragmentManager.findFragmentById(info.getGeneralContainer()))                     .remove(fragmentManager.findFragmentById(info.getDetailsContainer()))                     .commit();             fragmentManager.executePendingTransactions();             fragmentManager.beginTransaction()                     .replace(info.getGeneralContainer(), restoreFragment(fragmentStateList.getLast()))                     .replace(info.getDetailsContainer(), fragment)                     .commit();             fragmentManager.executePendingTransactions();             fragmentStateList.removeLast();         }     }     @SuppressLint(&quot;LongLogTag&quot;)     public void popBackStack() {         Log.d(TAG, &quot;popBackStack called, backstack was: &quot; + fragmentStateList.size());         if(info.getOrientation() == Config.Orientation.PORTRAIT) {             \/\/fragmentStateList.removeLast();             fragmentManager.beginTransaction()                     .remove(fragmentManager.findFragmentById(info.getGeneralContainer()))                     .commit();             fragmentManager.executePendingTransactions();             fragmentManager.beginTransaction()                     .replace(info.getGeneralContainer(), restoreFragment(fragmentStateList.getLast()))                     .commit();             fragmentStateList.removeLast();         } else if(fragmentStateList.size() &gt; 0) {             \/\/fragmentStateList.removeLast();             saveOldestVisibleFragmentState();             fragmentManager.beginTransaction()                     .remove(fragmentManager.findFragmentById(info.getDetailsContainer()))                     .remove(fragmentManager.findFragmentById(info.getGeneralContainer()))                     .commit();             fragmentManager.executePendingTransactions();             fragmentManager.beginTransaction()                     .replace(info.getGeneralContainer(), restoreFragment(fragmentStateList.get(fragmentStateList.size() - 2)))                     .replace(info.getDetailsContainer(), restoreFragment(fragmentStateList.getLast()))                     .commit();             \/\/remove the fragment that was in the details container before popbackstack was called as it is no longer accessible to user             fragmentStateList.removeLast();             fragmentStateList.removeLast();         } else if(getFragmentCount() == 2) {             fragmentManager.beginTransaction()                     .remove(fragmentManager.findFragmentById(info.getDetailsContainer()))                     .commit();             fragmentManager.executePendingTransactions();         }         listener.onBackStackChanged();     }     @SuppressLint(&quot;LongLogTag&quot;)     public void onRestoreInstanceState() {         onSaveInstanceState = false;         if(!onRestoreInstanceState) {             onRestoreInstanceState = true;             if (fragmentStateList != null) {                 if(info.getOrientation() == Config.Orientation.LANDSCAPE) {                     if (fragmentStateList.size() &gt; 1) {                         fragmentManager.beginTransaction()                                 .replace(info.getGeneralContainer(), restoreFragment(fragmentStateList.get(fragmentStateList.size() - 2)))                                 .replace(info.getDetailsContainer(), restoreFragment(fragmentStateList.getLast()))                                 .commit();                         \/\/remove state of visible fragments                         fragmentStateList.removeLast();                         fragmentStateList.removeLast();                         Log.d(TAG, &quot;restored in landscape mode, backstack: &quot; + fragmentStateList.size());                     } else if (fragmentStateList.size() == 1) {                         fragmentManager.beginTransaction()                                 .replace(info.getGeneralContainer(), restoreFragment(fragmentStateList.getLast()))                                 .commit();                         \/\/remove state of only visible fragment                         fragmentStateList.removeLast();                         Log.d(TAG, &quot;restored in landscape mode, backstack is clear&quot;);                     }                 } else {                     fragmentManager.beginTransaction()                             .replace(info.getGeneralContainer(), restoreFragment(fragmentStateList.getLast()))                             .commit();                     \/\/remove state of visible fragment                     fragmentStateList.removeLast();                     Log.d(TAG, &quot;restored in portrait mode, backstack: &quot; + fragmentStateList.size());                 }             }         }         fragmentManager.executePendingTransactions();     }     @SuppressLint(&quot;LongLogTag&quot;)     public void onSaveInstanceState() {         if(!onSaveInstanceState) {             onRestoreInstanceState = false;             onSaveInstanceState = true;             if(info.getOrientation() == Config.Orientation.LANDSCAPE) {                 if(saveOldestVisibleFragmentState()) {                     saveDetailsFragmentState();                 }                 Log.d(TAG, &quot;saved state before recreating fragments in portrait, now stack is: &quot; + fragmentStateList.size());             } else if(info.getOrientation() == Config.Orientation.PORTRAIT) {                 saveOldestVisibleFragmentState();                 Log.d(TAG, &quot;saved state before recreating fragments in landscape, now stack is: &quot; + fragmentStateList.size());             }             FragmentTransaction transaction = fragmentManager.beginTransaction();             if (fragmentManager.findFragmentById(info.getGeneralContainer()) != null) {                 transaction.remove(fragmentManager.findFragmentById(info.getGeneralContainer()));             }             if (fragmentManager.findFragmentById(info.getDetailsContainer()) != null) {                 transaction.remove(fragmentManager.findFragmentById(info.getDetailsContainer()));             }             transaction.commit();         }     }     public int getBackStackDepth() {         return fragmentStateList.size();     }     public int getFragmentCount() {         int count = 0;         if(fragmentManager.findFragmentById(info.getGeneralContainer()) != null) {             count++;             if(info.getOrientation() == Config.Orientation.LANDSCAPE && fragmentManager.findFragmentById(info.getDetailsContainer()) != null) {                 count++;             }             count += getBackStackDepth();         }         return count;     }     private Fragment restoreFragment(State state) {         try {             Fragment fragment = ((Fragment) Class.forName(state.getFragmentName()).newInstance());             fragment.setInitialSavedState(state.getFragmentState());             return fragment;         } catch (InstantiationException e) {             e.printStackTrace();         } catch (ClassNotFoundException e) {             e.printStackTrace();         } catch (IllegalAccessException e) {             e.printStackTrace();         }         return null;     }     @SuppressLint(&quot;LongLogTag&quot;)     private boolean saveOldestVisibleFragmentState() {         Fragment current = fragmentManager.findFragmentById(info.getGeneralContainer());         if (current != null) {             Log.d(TAG, &quot;saveOldestVisibleFragmentState called, current was not null&quot;);             fragmentStateList.add(new State(current.getClass().getCanonicalName(), fragmentManager.saveFragmentInstanceState(current)));         }         return current != null;     }     @SuppressLint(&quot;LongLogTag&quot;)     private boolean saveDetailsFragmentState() {         Fragment details = fragmentManager.findFragmentById(info.getDetailsContainer());         if(details != null) {             Log.d(TAG, &quot;saveDetailsFragmentState called, details was not null&quot;);             fragmentStateList.add(new State(details.getClass().getCanonicalName(), fragmentManager.saveFragmentInstanceState(details)));         }         return details != null;     }     public void setOnBackStackChangeListener(OnBackStackChangeListener listener) {         this.listener = listener;     }     public void removeOnBackStackChangeListener() {         this.listener = listenerNull;     }     @Override     public int describeContents() {         return 0;     }     @Override     public void writeToParcel(Parcel dest, int flags) {         dest.writeList(fragmentStateList);         dest.writeParcelable(info, 0);     }     public static Parcelable.Creator&lt;MultipaneFragmentManager&gt; CREATOR = new Creator&lt;MultipaneFragmentManager&gt;() {         @Override         public MultipaneFragmentManager createFromParcel(Parcel in) {             return new MultipaneFragmentManager(in);         }         @Override         public MultipaneFragmentManager[] newArray(int size) {             return new MultipaneFragmentManager[0];         }     }; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u044f \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 <code>FragmentManager.executePendingTransactions()<\/code>, \u044d\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u043e \u043a\u043e\u043b\u043b\u0438\u0437\u0438\u0438. \u041e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0442\u0438 \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 \u0432 landscape \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043e\u043d \u0435\u0449\u0435 \u043d\u0435 \u0431\u044b\u043b \u043e\u0442\u0432\u044f\u0437\u0430\u043d \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432 \u0434\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0448\u044c workaround \u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0439 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b, \u043d\u043e \u043d\u0435 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434. \u0422\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0442\u043e\u0440\u043c\u0430\u0436\u0438\u0432\u0430\u0442\u044c UI \u043d\u0430 \u0441\u043b\u0430\u0431\u044b\u0445 \u0434\u0435\u0432\u0430\u0439\u0441\u0430\u0445, \u043d\u043e \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u0438, \u0444\u0440\u0438\u0437\u044b \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430\u0445 \u0431\u0443\u0434\u0443\u0442 \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u044b\u043c\u0438.  <\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435, \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e + \u043f\u0440\u0438\u043c\u0435\u0440:<br \/>  <a href=\"https:\/\/gitlab.com\/i.komarov\/multipane-fragmentmanager\">gitlab.com\/i.komarov\/multipane-fragmentmanager<\/a>  <\/p>\n<p>  <\/p>\n<p>\u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u043f\u0440\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f\u043c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043a\u0440\u0438\u0442\u0438\u043a\u0438, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439.   <\/p>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/316746\/\"> https:\/\/habrahabr.ru\/post\/316746\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<h3>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435, \u0438\u043b\u0438 \u0437\u0430\u0447\u0435\u043c \u0432\u0441\u0435 \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e<\/h3>\n<p>  <\/p>\n<p>\u041d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u043c\u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 single-pane \u0438 dual-pane \u0440\u0435\u0436\u0438\u043c\u0430\u043c\u0438 \u043f\u0440\u0438 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0435 \u044d\u043a\u0440\u0430\u043d\u0430. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438, \u043c\u0435\u043d\u044f \u043d\u0435 \u0443\u0441\u0442\u0440\u043e\u0438\u043b\u0438, \u0442\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0437\u043e\u0449\u0440\u044f\u0442\u044c\u0441\u044f \u0438 \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434.  <\/p>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/3b9\/5b4\/142\/3b95b4142c55c2fef88a22ee085bf0e3.png\" alt=\"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442\" \/><\/div>\n<p>  <\/p>\n<p>\u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432 \u043d\u043e\u0442\u0430\u0446\u0438\u044f\u0445 material design \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u044d\u043a\u0440\u0430\u043d\u0430, \u043c\u0435\u0441\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e, \u0430 \u043f\u043e\u0442\u043e\u043c\u0443 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u0434\u0432\u0430 \u0440\u0435\u0436\u0438\u043c\u0430: single-pane (\u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0434\u0438\u043d \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u0441\u044f \u0432\u043d\u0438\u0437\u0443 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438) \u0438 dual\/multi-pane (\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u043c\u0438, \u0438\u0434\u0443\u0449\u0438\u043c\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438)  <\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0432\u0438\u0434\u0435\u043b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043b\u0438\u0431\u043e ViewPager, \u043b\u0438\u0431\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e Activity. \u042f \u0436\u0435 \u0440\u0435\u0448\u0438\u043b \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u0435\u0439\u0441 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432 \u043b\u0438\u0448\u044c FragmentManager \u0438 \u0434\u0432\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-282129","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/282129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=282129"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/282129\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=282129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=282129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=282129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}