title: Multiple views in the same Activity
body: <p>I'm developing a Tinder-like Android application and I am using <a href="https://github.com/Diolor/Swipecards" rel="nofollow">this</a> library to implement the card swiping functionality.
  For the swipe screen, I use this layout:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools"
          style="@style/BackgroundStyle"
          android:padding="16dp"&gt;
          &lt;RelativeLayout
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"&gt;
                  &lt;com.lorentzos.flingswipe.SwipeFlingAdapterView
                      xmlns:android="http://schemas.android.com/apk/res/android"
                      xmlns:app="http://schemas.android.com/apk/res-auto"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      app:rotation_degrees="16"
                      app:max_visible="2"
                      app:min_adapter_stack="1"
                      android:id="@+id/swipeView"/&gt;
          &lt;/RelativeLayout&gt;
          &lt;fragment
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:layout_alignParentBottom="true"
              android:id="@+id/tabmenu"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>and inflating it in the activity:</p>
  
  <pre><code>protected void onCreate(final Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_swipe);
      ...
  </code></pre>
  
  <p>I am now planning on adding different types of cards (that have different designs) and am facing the problem of using multiple views for the same activity.
  For instance, one card will have a person on it. Another card might have a question, etc. Is there any smart way of using different views in the same activity? The intended functionality is that you see 4-5 cards with people on them, then you see a card with a question / feedback request, then you should see people again, and so on.</p>
  
  <p>The Swipe library uses an ArrayAdapter to keep the objects that represent cards, and the layout of the card is given by the getView() function:</p>
  
  <pre><code>public View getView(int position, View convertView, ViewGroup parent) {
          LayoutInflater inflater = (LayoutInflater) context
                  .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          View rowView = inflater.inflate(R.layout.cardlayout, parent, false);
          ...
  </code></pre>
  
  <p>Is there any way to make this load different views according to some input/attribute?</p>
  
  <p>Cheers!</p>