{"id":254908,"date":"2015-04-09T19:18:02","date_gmt":"2015-04-09T15:18:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=254908"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=254908","title":{"rendered":"\u0412\u0441\u0442\u0440\u043e\u0438\u0432\u0430\u0435\u043c RecyclerView \u0432 CardView"},"content":{"rendered":"<p>     \t<img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/88f\/95f\/875\/88f95f8754a84515b51207651b02944e.gif\"\/><\/p>\n<p>  \u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0432 \u043f\u043e\u0441\u0442 \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u043e \u043d\u043e\u0432\u044b\u0445 \u0432\u0438\u0434\u0436\u0435\u0442\u0430\u0445 <a href=\"http:\/\/habrahabr.ru\/post\/237101\/\">RecyclerView \u0438 CardView. \u041d\u043e\u0432\u044b\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0432 Android L <\/a> \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c<br \/>  \u0412 \u0441\u0435\u0442\u0438 \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0433\u0434\u0435 CardView \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 RecyclerView. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u043e \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u0432\u0441\u0442\u0440\u043e\u0438\u0442\u044c RecyclerView \u0432 CardView. \u0427\u0442\u043e\u0431\u044b \u0435\u0449\u0435 \u044d\u0442\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u043c<\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0421\u043a\u0430\u0447\u0430\u043b \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438. \u0421\u0440\u0430\u0437\u0443 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u0440\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u043a\u043e\u0434 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443  <\/p>\n<pre><code class=\"java\">    private void delete(Record record) {         int position = records.indexOf(record);         Log.i(&quot;&gt;&quot; , &quot;position=&quot; + position);         if( position != -1 ) {             records.remove(position);             notifyItemRemoved(position);         }     } <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0431\u044b\u043b\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0430\u043b\u043e\u2026 \u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430, \u0432\u044b\u043b\u0435\u0437\u043b\u0430 \u0434\u0440\u0443\u0433\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. CardView \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u00ab\u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044c\u00bb \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437 RecyclerView \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443 \u043f\u043e \u0432\u044b\u0441\u043e\u0442\u0435. wrap_content \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442. \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u043c\u043d\u043e\u0433\u0438\u0435 \u0443\u0436\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0438 \u0435\u0441\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f: <a href=\"http:\/\/stackoverflow.com\/questions\/26649406\/nested-recycler-view-height-doesnt-wrap-its-content\">Nested Recycler view height doesn&#8217;t wrap its content<\/a><\/p>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 <a href=\"https:\/\/www.grokkingandroid.com\/first-glance-androids-recyclerview\/\">A First Glance at Android\u2019s RecyclerView<\/a> \u0434\u0443\u043c\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b layoutManager.getDecoratedMeasuredHeight()\u2026 \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u043e. \u0420\u0430\u0437\u043c\u0435\u0440\u044b \u0432\u043e\u0437\u0440\u0430\u0449\u0430\u043b\u0438\u0441\u044c 0<br \/>  \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c onMeasure \u0432 LinearLayoutManager. \u0412\u0437\u044f\u0442\u043e \u0441\u043e stackoverflow:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">MyLinearLayoutManager<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">    public class MyLinearLayoutManager extends LinearLayoutManager {          public MyLinearLayoutManager(Context context, int orientation, boolean reverseLayout) {             super(context, orientation, reverseLayout);         }          public MyLinearLayoutManager(Context context) {             super(context);         }          private int[] mMeasuredDimension = new int[2];         @Override         public void onMeasure(RecyclerView.Recycler recycler, RecyclerView.State state,                               int widthSpec, int heightSpec) {             final int widthMode = View.MeasureSpec.getMode(widthSpec);             final int heightMode = View.MeasureSpec.getMode(heightSpec);             final int widthSize = View.MeasureSpec.getSize(widthSpec);             final int heightSize = View.MeasureSpec.getSize(heightSpec);             int width = 0;             int height = 0;             for (int i = 0; i &lt; getItemCount(); i++) {                  if (getOrientation() == HORIZONTAL) {                      measureScrapChild(recycler, i,                             View.MeasureSpec.makeMeasureSpec(i, View.MeasureSpec.UNSPECIFIED),                             heightSpec,                             mMeasuredDimension);                      width = width + mMeasuredDimension[0];                     if (i == 0) {                         height = mMeasuredDimension[1];                     }                 } else {                     measureScrapChild(recycler, i,                             widthSpec,                             View.MeasureSpec.makeMeasureSpec(i, View.MeasureSpec.UNSPECIFIED),                             mMeasuredDimension);                     height = height + mMeasuredDimension[1];                     if (i == 0) {                         width = mMeasuredDimension[0];                     }                 }             }             switch (widthMode) {                 case View.MeasureSpec.EXACTLY:                     width = widthSize;                 case View.MeasureSpec.AT_MOST:                 case View.MeasureSpec.UNSPECIFIED:             }              switch (heightMode) {                 case View.MeasureSpec.EXACTLY:                     height = heightSize;                 case View.MeasureSpec.AT_MOST:                 case View.MeasureSpec.UNSPECIFIED:             }              setMeasuredDimension(width, height);         }          private void measureScrapChild(RecyclerView.Recycler recycler, int position, int widthSpec,                                        int heightSpec, int[] measuredDimension) {             View view = recycler.getViewForPosition(position);             recycler.bindViewToPosition(view, position);             if (view != null) {                 RecyclerView.LayoutParams p = (RecyclerView.LayoutParams) view.getLayoutParams();                 int childWidthSpec = ViewGroup.getChildMeasureSpec(widthSpec,                         getPaddingLeft() + getPaddingRight(), p.width);                 int childHeightSpec = ViewGroup.getChildMeasureSpec(heightSpec,                         getPaddingTop() + getPaddingBottom(), p.height);                 view.measure(childWidthSpec, childHeightSpec);                 measuredDimension[0] = view.getMeasuredWidth() + p.leftMargin + p.rightMargin;                 measuredDimension[1] = view.getMeasuredHeight() + p.bottomMargin + p.topMargin;                 recycler.recycleView(view);             }         }     } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0417\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u043b\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043a\u043e\u043d\u0446\u0430. \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u0438\u0437 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u044b \u0438\u043b\u0438 \u0441 \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u043e \u043a \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044e:  <\/p>\n<pre><code class=\"xml\">java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 3(offset:-1).state:5 <\/code><\/pre>\n<p>  \u0421\u0442\u0440\u0430\u043d\u043d\u043e. \u041f\u043e\u0433\u0443\u0433\u043b\u0438\u0432 \u0435\u0449\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e, \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0443 \u043d\u0430\u0440\u043e\u0434\u0430 <a href=\"https:\/\/github.com\/lucasr\/twoway-view\/issues\/134\">IndexOutOfBoundsException Invalid item position XX(XX). Item count:XX #134<\/a>. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u0432\u0435\u0441\u044c \u0442\u043e\u043f\u0438\u043a \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b:<\/p>\n<p>  It is indeed a RecyclerView bug and is yet to be fixed.<\/p>\n<p>  For more information check:<br \/>  <a href=\"https:\/\/code.google.com\/p\/android\/issues\/detail?id=77846\">code.google.com\/p\/android\/issues\/detail?id=77846<\/a><br \/>  <a href=\"https:\/\/code.google.com\/p\/android\/issues\/detail?id=77232\">code.google.com\/p\/android\/issues\/detail?id=77232<\/a><\/p>\n<p>  \u0410 \u0441\u0442\u0440\u043e\u0447\u043a\u043e\u0439 \u0432\u044b\u0448\u0435 \u043a\u0430\u043a \u0440\u0430\u0437 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435:<\/p>\n<p>  Now I am doing some dirty workaround like<br \/>  if (index == 0) {notifydatasetchange();} else {notifyItemRemoved(index)} <\/p>\n<p>  \u0422\u043e\u0447\u043d\u0435\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u043a\u0430\u043a \u0443\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u044f \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c notifyItemRemoved(index) \u043d\u0430 notifydatasetchange(). \u0421 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435, \u043d\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u0438 \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435<\/p>\n<p>  \u0422\u0430\u043a\u043e\u0439 PopUp \u0432\u0438\u0434\u0436\u0435\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0412\u043c\u0435\u0441\u0442\u043e \u043e\u043a\u043e\u043d \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0430. \u041f\u043e \u0442\u0430\u0439\u043c\u0435\u0440\u0443 \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0432\u0435\u0440\u0445\u043d\u0435\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0438\u043b\u0438 \u043f\u0440\u0438 \u043a\u043b\u0438\u043a\u0435 \u043d\u0430 \u043d\u0435\u0433\u043e \u0441\u0440\u0430\u0437\u0443.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Fragment<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public class PlusOneFragment extends Fragment { ...     @Override     public View onCreateView(LayoutInflater inflater, ViewGroup container,                              Bundle savedInstanceState) {         \/\/ Inflate the layout for this fragment         View view = inflater.inflate(R.layout.fragment_plus_one, container, false);          List&lt;Record&gt; records = new ArrayList&lt;Record&gt;();         populateRecords(records);          recyclerView = (RecyclerView)view.findViewById(R.id.recyclerView);         \/\/recyclerView.setHasFixedSize(false);         adapter = new RecyclerViewAdapter(records);         LinearLayoutManager layoutManager = new MyLinearLayoutManager(getActivity());         RecyclerView.ItemAnimator itemAnimator = new DefaultItemAnimator();          recyclerView.setAdapter(adapter);         recyclerView.setLayoutManager(layoutManager);         recyclerView.setItemAnimator(itemAnimator);          cardView = (CardView)view.findViewById(R.id.cardView);          return view;     } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Layout<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">&lt;FrameLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;     xmlns:tools=&quot;http:\/\/schemas.android.com\/tools&quot;     xmlns:card_view=&quot;http:\/\/schemas.android.com\/apk\/res-auto&quot;     android:layout_width=&quot;match_parent&quot;     android:layout_height=&quot;wrap_content&quot;     tools:context=&quot;.PlusOneFragment&quot;&gt;      &lt;android.support.v7.widget.CardView         android:layout_width=&quot;wrap_content&quot;         android:layout_height=&quot;wrap_content&quot;         android:id=&quot;@+id\/cardView&quot;         card_view:cardCornerRadius=&quot;6dp&quot;         card_view:cardBackgroundColor=&quot;#84ffff&quot;&gt;              &lt;android.support.v7.widget.RecyclerView                 android:layout_width=&quot;400dp&quot;                 android:layout_height=&quot;wrap_content&quot;                 android:id=&quot;@+id\/recyclerView&quot; \/&gt;     &lt;\/android.support.v7.widget.CardView&gt; &lt;\/FrameLayout&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Activity<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">        Fragment newFragment = PlusOneFragment.newInstance();         getSupportFragmentManager()                 .beginTransaction()                 .replace(R.id.container, newFragment)                 .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)                 .addToBackStack(null)                 .commit(); <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">RecyclerViewAdapter<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">package com.renal128.demo.recyclerviewdemo.adapter;  import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView;  import com.renal128.demo.recyclerviewdemo.R; import com.renal128.demo.recyclerviewdemo.model.Record;  import java.util.List;  public class RecyclerViewAdapter extends RecyclerView.Adapter&lt;RecyclerViewAdapter.ViewHolder&gt; {      private List&lt;Record&gt; records;      public RecyclerViewAdapter(List&lt;Record&gt; records) {         this.records = records;     }      public List&lt;Record&gt; getRecords() {         return records;     }      @Override     public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {         View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.recyclerview_item, viewGroup, false);         return new ViewHolder(v);     }      @Override     public void onBindViewHolder(ViewHolder viewHolder, int i) {         Record record = records.get(i);         int iconResourceId = 0;         switch (record.getType()) {             case GREEN:                 iconResourceId = R.drawable.green_circle;                 break;             case RED:                 iconResourceId = R.drawable.red_circle;                 break;             case YELLOW:                 iconResourceId = R.drawable.yellow_circle;                 break;         }         viewHolder.icon.setImageResource(iconResourceId);         viewHolder.name.setText(record.getName());         viewHolder.deleteButtonListener.setRecord(record);         viewHolder.copyButtonListener.setRecord(record);     }      @Override     public int getItemCount() {         return records.size();     }      private void copy(Record record) {         int position = records.indexOf(record);         Record copy = record.copy();         records.add(position + 1, copy);         \/\/notifyItemInserted(position + 1);         notifyDataSetChanged();     }      private void delete(Record record) {         int position = records.indexOf(record);         Log.i(&quot;&gt;&quot; , &quot;position=&quot; + position);         if( position != -1 ) {             records.remove(position);             \/\/notifyItemRemoved(position);             notifyDataSetChanged();         }     }      class ViewHolder extends RecyclerView.ViewHolder {          private TextView name;         private ImageView icon;         private Button deleteButton;         private Button copyButton;         private DeleteButtonListener deleteButtonListener;         private CopyButtonListener copyButtonListener;          public ViewHolder(View itemView) {             super(itemView);             name = (TextView) itemView.findViewById(R.id.recyclerViewItemName);             icon = (ImageView) itemView.findViewById(R.id.recyclerViewItemIcon);             deleteButton = (Button) itemView.findViewById(R.id.recyclerViewItemDeleteButton);             copyButton = (Button) itemView.findViewById(R.id.recyclerViewItemCopyButton);             deleteButtonListener = new DeleteButtonListener();             copyButtonListener = new CopyButtonListener();             deleteButton.setOnClickListener(deleteButtonListener);             copyButton.setOnClickListener(copyButtonListener);         }     }      private class CopyButtonListener implements View.OnClickListener {         private Record record;          @Override         public void onClick(View v) {             copy(record);         }          public void setRecord(Record record) {             this.record = record;         }     }      private class DeleteButtonListener implements View.OnClickListener {         private Record record;          @Override         public void onClick(View v) {             delete(record);         }          public void setRecord(Record record) {             this.record = record;         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0431\u044b\u043b \u0432\u0437\u044f\u0442 \u0437\u0434\u0435\u0441\u044c: <a href=\"https:\/\/github.com\/renal128\/RecyclerViewDemo\">github.com\/renal128\/RecyclerViewDemo<\/a><\/p>\n<p>  PlusOneFragment \u2014 \u042d\u0442\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442-\u0448\u0430\u0431\u043b\u043e\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u044e\u0431\u0435\u0437\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u043c\u043d\u0435 Android Studio<br \/>  @<a href=\"http:\/\/app-z.net\">App-z.net<\/a>     \t<\/p>\n<div class=\"clear\"><\/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\/255397\/\"> http:\/\/habrahabr.ru\/post\/255397\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>     \t<img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/88f\/95f\/875\/88f95f8754a84515b51207651b02944e.gif\"\/><\/p>\n<p>  \u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0432 \u043f\u043e\u0441\u0442 \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u043e \u043d\u043e\u0432\u044b\u0445 \u0432\u0438\u0434\u0436\u0435\u0442\u0430\u0445 <a href=\"http:\/\/habrahabr.ru\/post\/237101\/\">RecyclerView \u0438 CardView. \u041d\u043e\u0432\u044b\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0432 Android L <\/a> \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c<br \/>  \u0412 \u0441\u0435\u0442\u0438 \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0433\u0434\u0435 CardView \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 RecyclerView. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u043e \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u0432\u0441\u0442\u0440\u043e\u0438\u0442\u044c RecyclerView \u0432 CardView. \u0427\u0442\u043e\u0431\u044b \u0435\u0449\u0435 \u044d\u0442\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u043c<\/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-254908","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/254908","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=254908"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/254908\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=254908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=254908"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=254908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}