{"id":204940,"date":"2013-12-05T14:09:04","date_gmt":"2013-12-05T10:09:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=204940"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=204940","title":{"rendered":"<span class=\"post_title\">\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Header2ActionBar \u0434\u043b\u044f Android<\/span>"},"content":{"rendered":"<div class=\"content html_format\">\n<h4>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Header2ActionBar \u0434\u043b\u044f Android<\/h4>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/6d4\/6b0\/34d\/6d46b034db33478e6c43328255cd16ba.png\"\/>  <\/p>\n<h6>(\u0434\u0435\u043c\u043e \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f)<\/h6>\n<p>  \u0412\u044b, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0443\u0436\u0435 \u0432\u0438\u0434\u0435\u043b\u0438 \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u043e\u0442 Google (Play \u041c\u0443\u0437\u044b\u043a\u0430, Google \u041f\u0440\u0435\u0441\u0441\u0430) \u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0434\u0440\u0443\u0433\u0438\u0445. \u0414\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0443\u0436\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u0430\u0432\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043e\u0442 <a href=\"https:\/\/github.com\/ManuelPeinado\">ManuelPeinado<\/a> \u2014 <a href=\"https:\/\/github.com\/ManuelPeinado\/FadingActionBar\">FadingActionBar<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u0432\u043e\u044e \u0437\u0430\u0434\u0430\u0447\u0443, \u043d\u043e \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0438\u043c\u0435\u0435\u0442 \u0434\u0432\u0430 \u00ab\u0444\u0430\u0442\u0430\u043b\u044c\u043d\u044b\u0445\u00bb \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0430. <\/p>\n<p>  \u0412\u0442\u043e\u0440\u043e\u0439 \u0438\u0437 \u043d\u0438\u0445 \u043e\u043f\u0438\u0441\u0430\u043d \u043a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430:  <\/p>\n<blockquote><p>Known Issues<\/p>\n<p>  There is an important issue with the library and ListViews. More specifically, things don&#8217;t work quite right when the activity is re-created due to a configuration change. So, unless you handle configuration changes yourself (or your activity is portrait\/landscape only), I strongly suggest you stick to having your content in a ScrollView until a solution to this issue is found.<\/p><\/blockquote>\n<p>  \u0421\u0442\u0430\u0440\u0430\u044f\u0441\u044c \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a, \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0432 \u0438 \u043e\u0431\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0430 \ud83d\ude42<\/p>\n<p>  <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"\/\/www.youtube.com\/embed\/P2sNSF9LR6U?wmode=opaque\" frameborder=\"0\" allowfullscreen><\/iframe><br \/>  <a name=\"habracut\"><\/a><br \/>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0440\u0451\u0445 \u0444\u0430\u0439\u043b\u043e\u0432:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">FadingActionBarActivity.java<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">\/**  * Created by AChep@xda &lt;artemchep@gmail.com&gt;  *\/ public class FadingActionBarActivity extends Activity {      private static final String TAG = &quot;FadingActionBarActivity&quot;;      private int mAlpha = 255;     private Drawable mDrawable;      private boolean isAlphaLocked;      public void setActionBarBackgroundDrawable(Drawable drawable) {         getActionBar().setBackgroundDrawable(drawable);         mDrawable = drawable;          if (mAlpha == 255) {             if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.KITKAT)                 mAlpha = drawable.getAlpha();         } else {             setActionBarAlpha(mAlpha);         }     }      \/**      * An {@link android.app.ActionBar} background drawable.      *      * @see #setActionBarBackgroundDrawable(android.graphics.drawable.Drawable)      * @see #setActionBarAlpha(int)      *\/     public Drawable getActionBarBackgroundDrawable() {         return mDrawable;     }      \/**      * Please use this method for global changes only!      * Otherwise, please, use {@link android.graphics.drawable.Drawable#setAlpha(int)}      * to {@link #getActionBarBackgroundDrawable()} directly.      *      * @param alpha a value from 0 to 255      * @see #getActionBarBackgroundDrawable()      * @see #getActionBarAlpha()      *\/     public void setActionBarAlpha(int alpha) {         if (mDrawable == null) {             Log.w(TAG, &quot;Set action bar background before setting alpha!&quot;);             return;         }         if (!isAlphaLocked) mDrawable.setAlpha(alpha);         mAlpha = alpha;     }      public int getActionBarAlpha() {         return mAlpha;     }      public void setActionBarAlphaLocked(boolean isLocked) {         isAlphaLocked = isLocked;     }  }<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">HeaderFragment .java<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">\/**  * Little header fragment.  * &lt;p&gt;  * Created by AChep@xda &lt;artemchep@gmail.com&gt;  * &lt;\/p&gt;  *\/ public class HeaderFragment extends Fragment {      private static final String TAG = &quot;HeaderFragment&quot;;      private View mHeader;     private int mHeaderHeight;     private int mCurrentHeaderHeight;     private int mCurrentHeaderTranslateY;      private OnHeaderScrollChangeListener mOnHeaderScrollChangeListener;      public interface OnHeaderScrollChangeListener {         public void onHeaderScrollChanged(float progress, int height, int scroll);     }      public void setOnHeaderScrollChangeListener(OnHeaderScrollChangeListener listener) {         mOnHeaderScrollChangeListener = listener;     }      @Override     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {         final Activity activity = getActivity();          mHeader = inflater.inflate(getHeaderResource(), container, false);         mHeaderHeight = mHeader.getLayoutParams().height;         mCurrentHeaderHeight = mHeaderHeight;         mCurrentHeaderTranslateY = 0;         onPrepareHeaderView(mHeader);          View content = inflater.inflate(getContentResource(), container, false);         assert content != null;         if (content instanceof ListView) {             final ListView listView = (ListView) content;              \/\/ Perform fake header view.             final Space listFakeHeader = new Space(activity);             listFakeHeader.setLayoutParams(new ListView.LayoutParams(                     0, mHeaderHeight));              onPrepareContentListView(listView);             listView.addHeaderView(listFakeHeader);             listView.setOnScrollListener(new AbsListView.OnScrollListener() {                  @Override                 public void onScrollStateChanged(AbsListView absListView, int i) { \/* unused *\/ }                  @Override                 public void onScroll(AbsListView absListView, int i, int i2, int i3) {                     final View child = absListView.getChildAt(0);                     if (child == listFakeHeader) {                         updateHeaderScroll(child.getTop());                     } else {                         updateHeaderScroll(-mHeaderHeight);                     }                 }             });         } else {             onPrepareContentView(content);              final NotifyingScrollView scrollView = new NotifyingScrollView(activity);             scrollView.addView(content);             scrollView.setOnScrollChangedListener(new NotifyingScrollView.OnScrollChangedListener() {                 @Override                 public void onScrollChanged(ScrollView who, int l, int t, int oldl, int oldt) {                     updateHeaderScroll(-t);                 }             });             content = scrollView;         }          final FrameLayout root = new FrameLayout(activity);         root.addView(content, new FrameLayout.LayoutParams(                 ViewGroup.LayoutParams.MATCH_PARENT,                 ViewGroup.LayoutParams.MATCH_PARENT));         root.addView(mHeader);         return root;     }      private void updateHeaderScroll(int scrollTo) {         scrollTo = scrollTo &gt; 0 ? 0 : scrollTo &lt; -mHeaderHeight ? mHeaderHeight : scrollTo;          final boolean allowChangeHeight = isHeaderHeightFloating();         final int height = mHeaderHeight + scrollTo \/ 2;         final int transY = allowChangeHeight ? scrollTo \/ 2 : scrollTo;          if (height != mCurrentHeaderHeight && allowChangeHeight) {             final ViewGroup.LayoutParams lp = mHeader.getLayoutParams();             lp.height = height;             mHeader.setLayoutParams(lp);             mCurrentHeaderHeight = height;         }         if (transY != mCurrentHeaderTranslateY) {             mHeader.setTranslationY(transY);             mCurrentHeaderTranslateY = transY;              if (mOnHeaderScrollChangeListener != null) {                 \/\/ Notify upper fragment to update ActionBar's alpha or whatever.                 int scroll = Math.abs(scrollTo);                 mOnHeaderScrollChangeListener.onHeaderScrollChanged(                         (float) scroll \/ mHeaderHeight, mHeaderHeight, scroll);             }         }     }      \/**      * If true, header's height might be changed on scroll.      * &lt;p&gt;Note: It takes a lot of calculations to measure the header all the time.&lt;\/p&gt;      *\/     public boolean isHeaderHeightFloating() {         return false;     }      \/**      * Int reference to header's resource.      *      * @see #onPrepareHeaderView(android.view.View)      * @see #getContentResource()      *\/     public int getHeaderResource() {         return 0;     }      \/**      * This is the place for setting up the header.      *      * @param view inflated header view.      * @see #getHeaderResource()      *\/     public void onPrepareHeaderView(View view) { \/* for my child *\/ }      \/**      * Int reference to content's resource.      * &lt;p&gt;      * &lt;b&gt;Attention&lt;\/b&gt;: Parent view must be {@link android.widget.ListView ListView}      * or something else which will work inside of {@link android.widget.ScrollView ScrollView}.      * Otherwise it &lt;b&gt;WON'T&lt;\/b&gt; work.      * &lt;\/p&gt;      *      * @see #getHeaderResource()      * @see #onPrepareContentListView(ListView)      *\/     public int getContentResource() {         return 0;     }      \/**      * Called if the content's parent is a {@link android.widget.ListView ListView}.      *      * @see #getContentResource()      *\/     public void onPrepareContentListView(ListView listView) { \/* for my child *\/ }      \/**      * Called if the content's parent is NOT a {@link android.widget.ListView ListView}.      *      * @see #getContentResource()      *\/     public void onPrepareContentView(View view) { \/* for my child *\/ }  }<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">NotifyingScrollView .java<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">\/**  * @author Cyril Mottier with modifications from Manuel Peinado  *\/ public class NotifyingScrollView extends ScrollView {     \/\/ Edge-effects don't mix well with the translucent action bar in Android 2.X     private boolean mDisableEdgeEffects = true;      \/**      * @author Cyril Mottier      *\/     public interface OnScrollChangedListener {         void onScrollChanged(ScrollView who, int l, int t, int oldl, int oldt);     }      private OnScrollChangedListener mOnScrollChangedListener;      public NotifyingScrollView(Context context) {         super(context);     }      public NotifyingScrollView(Context context, AttributeSet attrs) {         super(context, attrs);     }      public NotifyingScrollView(Context context, AttributeSet attrs, int defStyle) {         super(context, attrs, defStyle);     }      @Override     protected void onScrollChanged(int l, int t, int oldl, int oldt) {         super.onScrollChanged(l, t, oldl, oldt);         if (mOnScrollChangedListener != null) {             mOnScrollChangedListener.onScrollChanged(this, l, t, oldl, oldt);         }     }      public void setOnScrollChangedListener(OnScrollChangedListener listener) {         mOnScrollChangedListener = listener;     }      @Override     protected float getTopFadingEdgeStrength() {         \/\/ http:\/\/stackoverflow.com\/a\/6894270\/244576         if (mDisableEdgeEffects && Build.VERSION.SDK_INT &lt; Build.VERSION_CODES.HONEYCOMB) {             return 0.0f;         }         return super.getTopFadingEdgeStrength();     }      @Override     protected float getBottomFadingEdgeStrength() {         \/\/ http:\/\/stackoverflow.com\/a\/6894270\/244576         if (mDisableEdgeEffects && Build.VERSION.SDK_INT &lt; Build.VERSION_CODES.HONEYCOMB) {             return 0.0f;         }         return super.getBottomFadingEdgeStrength();     } }<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0438 \u043b\u0435\u0436\u0438\u0442 \u043d\u0430 <a href=\"https:\/\/github.com\/AChep\/Header2ActionBar\">GitHub<\/a>&#8216;\u0435 \u043a\u0430\u043a \u043f\u0440\u043e\u0435\u043a\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u0432 Android Studio.<\/p>\n<h4>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435<\/h4>\n<p>  <i>HeaderFragment \u0438 FadingActionBarActivity \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044e\u0442\u0441\u044f \u043e\u0442 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043e\u0431\u0440\u0430\u0442\u044c\u0435\u0432, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u043a\u0430 \u043e Android &lt; 4.0 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0431\u044b\u0442\u044c.<\/i> <br \/>  \u041d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043e\u0431\u0438\u0435\u043c \u0434\u0435\u043c\u043e \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u0441\u0432\u0435\u0440\u0445\u0443. \u0418\u0442\u0430\u043a, \u043f\u0440\u0438\u043c\u0435\u0440 Activity:  <\/p>\n<pre><code class=\"java\"> public class MainActivity extends FadingActionBarActivity {      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);          \/\/ \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0444\u043e\u043d\u0430 ActionBar'a           setActionBarBackgroundDrawable(getResources().getDrawable(R.drawable.actionbar_bg));          FragmentManager fragmentManager = getFragmentManager();         fragmentManager.beginTransaction()                 .replace(R.id.container,  new TestHeaderFragment()                 ).commit();     } }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"java\">public class TestHeaderFragment extends HeaderFragment {      @Override     public void onAttach(Activity activity) {         super.onAttach(activity);          \/\/ \u041c\u0435\u043d\u044f\u0435\u043c \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c ActionBar'a \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u043a\u0440\u043e\u043b\u043b\u0438\u043d\u0433\u0430         setOnHeaderScrollChangeListener(new OnHeaderScrollChangeListener() {             @Override             public void onHeaderScrollChanged(float progress, int height, int scroll) {                 height -= getActivity().getActionBar().getHeight();                 progress = (float) scroll \/ height;                 if (progress &gt; 1f) progress = 1f;                 ((FadingActionBarActivity) getActivity()).setActionBarAlpha((int) (255 * progress));             }         });     }      @Override     public int getHeaderResource() {         return R.layout.header;     }      @Override     public void onPrepareHeaderView(View view) {         super.onPrepareHeaderView(view);         \/\/ \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c view \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c     }      @Override     public int getContentResource() {         return R.layout.content;     }      @Override     public void onPrepareContentListView(ListView listView) {         super.onPrepareContentListView(listView);         \/\/ \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c view \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c         listView.setAdapter(new ArrayAdapter&lt;&gt;(getActivity(), android.R.layout.simple_list_item_1, android.R.id.title, new String[]{&quot;Android&quot;, &quot;Android&quot;, &quot;Android&quot;, &quot;Android&quot;, &quot;Android&quot;, &quot;Android&quot;, &quot;Android&quot;, &quot;Android&quot;, &quot;Android&quot;, &quot;Android&quot;, &quot;Android&quot;}));     }<\/code><\/pre>\n<p>  \u042f \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e \u0441\u0432\u043e\u0435 \u043b\u0438\u0446\u043e \u0440\u0443\u043a\u0430\u043c\u0438 \u0438 \u043f\u0440\u043e\u0448\u0443 \u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0437\u0430 \u0441\u0432\u043e\u0439 \u043a\u043e\u0434 \u0438 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0439. \ud83d\ude41    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\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=\"http:\/\/habrahabr.ru\/post\/204940\/\"> http:\/\/habrahabr.ru\/post\/204940\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">\n<h4>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Header2ActionBar \u0434\u043b\u044f Android<\/h4>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/6d4\/6b0\/34d\/6d46b034db33478e6c43328255cd16ba.png\"\/>  <\/p>\n<h6>(\u0434\u0435\u043c\u043e \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f)<\/h6>\n<p>  \u0412\u044b, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0443\u0436\u0435 \u0432\u0438\u0434\u0435\u043b\u0438 \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u043e\u0442 Google (Play \u041c\u0443\u0437\u044b\u043a\u0430, Google \u041f\u0440\u0435\u0441\u0441\u0430) \u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0434\u0440\u0443\u0433\u0438\u0445. \u0414\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0443\u0436\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u0430\u0432\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043e\u0442 <a href=\"https:\/\/github.com\/ManuelPeinado\">ManuelPeinado<\/a> \u2014 <a href=\"https:\/\/github.com\/ManuelPeinado\/FadingActionBar\">FadingActionBar<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u0432\u043e\u044e \u0437\u0430\u0434\u0430\u0447\u0443, \u043d\u043e \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0438\u043c\u0435\u0435\u0442 \u0434\u0432\u0430 \u00ab\u0444\u0430\u0442\u0430\u043b\u044c\u043d\u044b\u0445\u00bb \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0430. <\/p>\n<p>  \u0412\u0442\u043e\u0440\u043e\u0439 \u0438\u0437 \u043d\u0438\u0445 \u043e\u043f\u0438\u0441\u0430\u043d \u043a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430:  <\/p>\n<blockquote><p>Known Issues<\/p>\n<p>  There is an important issue with the library and ListViews. More specifically, things don&#8217;t work quite right when the activity is re-created due to a configuration change. So, unless you handle configuration changes yourself (or your activity is portrait\/landscape only), I strongly suggest you stick to having your content in a ScrollView until a solution to this issue is found.<\/p><\/blockquote>\n<p>  \u0421\u0442\u0430\u0440\u0430\u044f\u0441\u044c \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a, \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0432 \u0438 \u043e\u0431\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0430 \ud83d\ude42<\/p>\n<p>  <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"\/\/www.youtube.com\/embed\/P2sNSF9LR6U?wmode=opaque\" frameborder=\"0\" allowfullscreen><\/iframe>  <\/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-204940","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/204940","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=204940"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/204940\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=204940"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=204940"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=204940"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}