title: Enabling collapse and expand on CardView
body: <p>I want to display some news using CardView (which is able to be collapsed and expanded). By default, the CardView is not expanded, thus only the news title is displayed. But if expanded, a WebView is visible, displaying the news page.</p>
  
  <p>These are my code so far:`</p>
  
  <p><strong>News.java</strong></p>
  
  <pre><code>public class News {
  
  private String title;
  private String url;
  
  public News(){
      this("", "");
  }
  
  public News(String title, String url){
      this.title = title;
      this.url = url;
  }
  
  public void setTitle(String title){
      this.title = title;
  }
  
  public void setUrl(String url){
      this.url = url;
  }
  
  public String getTitle(){
      return title;
  }
  
  public String getUrl(){
      return url;
  }
  }
  </code></pre>
  
  <p>`
  <strong>NewsViewHolder.java</strong></p>
  
  <pre><code>public class NewsViewHolder extends RecyclerView.ViewHolder {
      public TextView newsTitle;
      public WebView newsContent;
  
      public NewsViewHolder(View itemView){
          super(itemView);
          newsTitle = (TextView) itemView.findViewById(R.id.news_title);
          newsContent = (WebView) itemView.findViewById(R.id.news_web_content);
      }
  }
  </code></pre>
  
  <p><strong>NewsListAdapter.java</strong></p>
  
  <pre><code>public class NewsListAdapter extends RecyclerView.Adapter&lt;NewsViewHolder&gt; {
  
  private final List&lt;News&gt; newsList;
  
  public NewsListAdapter(List&lt;News&gt; newsList) {
      this.newsList = newsList;
  }
  
  @Override
  public NewsViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
      final LayoutInflater layoutInflater = LayoutInflater.from(viewGroup.getContext());
      final View v = layoutInflater.inflate(R.layout.news_card, viewGroup, false);
      return new NewsViewHolder(v);
  }
  
  @Override
  public void onBindViewHolder(NewsViewHolder holder, int i) {
      holder.newsTitle.setText(newsList.get(i).getTitle());
      holder.newsContent.loadUrl(newsList.get(i).getUrl());
  }
  
  @Override
  public int getItemCount() {
      return newsList.size();
  }
  }
  </code></pre>
  
  <p><strong>NewsFragment.java</strong></p>
  
  <pre><code>public class NewsFragment extends Fragment {
  
  private RecyclerView recView;
  
  public static NewsFragment newInstance(String param1, String param2){
      NewsFragment fragment = new NewsFragment();
      return fragment;
  }
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
  
      View view = inflater.inflate(R.layout.fragment_news, container, false);
      recView = (RecyclerView) view.findViewById(R.id.news_list);
      recView.setLayoutManager(new LinearLayoutManager(getActivity()));
  
      ((AppCompatActivity)getActivity()).getSupportActionBar().setTitle("News");
  
      List&lt;News&gt; dummyNews = new ArrayList&lt;News&gt;();
      for (int x = 1; x &lt;= 5; x++){
          News news = new News("News #"+x, "file:///android_asset/www/dummy.html");
          dummyNews.add(news);
      }
  
      recView.setAdapter(new NewsListAdapter(dummyNews));
      return view;
  }
  }
  </code></pre>
  
  <p>`</p>
  
  <p><strong>news_card.xml</strong>
      
      </p>
  
  <pre><code>&lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      android:padding="@dimen/card_padding"
      tools:background="#22000000"&gt;
  
      &lt;TextView
          android:id="@+id/news_title"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:padding="@dimen/default_margin_padding"
          android:textSize="@dimen/quiz_question_text_size" /&gt;
  
      &lt;WebView
          android:id="@+id/news_web_content"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent" /&gt;
  
  
      &lt;!-- dummy sharing buttons --&gt;
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="horizontal" &gt;
  
          &lt;TextView
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:gravity="center"
              android:textSize="16sp"
              android:text="WhatsApp"
              tools:ignore="HardcodedText" /&gt;
  
          &lt;TextView
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:gravity="center"
              android:textSize="16sp"
              android:text="E-mail"
              tools:ignore="HardcodedText" /&gt;
  
          &lt;TextView
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:gravity="center"
              android:textSize="16sp"
              android:text="Facebook"
              tools:ignore="HardcodedText" /&gt;
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>All the news are displayed correctly. Now the issues are:</p>
  
  <ol>
  <li>How to add a button on the right of the CardView, to enable collapsing/expanding?</li>
  <li>When collapsed, only the news title is visible.</li>
  </ol>
  
  <p>How to do those? Or is there any 3rd party CardView library which suits my requirements? Thank you.</p>