@Override
  protected void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.list_view);

    ListView listView = (ListView) findViewById(R.id.list_view);

    mGoogleCardsAdapter = new GoogleCardsSocialAdapter(this, DummyContent.getDummyModelList());
    SwingBottomInAnimationAdapter swingBottomInAnimationAdapter =
        new SwingBottomInAnimationAdapter(new SwipeDismissAdapter(mGoogleCardsAdapter, this));
    swingBottomInAnimationAdapter.setAbsListView(listView);

    assert swingBottomInAnimationAdapter.getViewAnimator() != null;
    swingBottomInAnimationAdapter.getViewAnimator().setInitialDelayMillis(INITIAL_DELAY_MILLIS);

    listView.setClipToPadding(false);
    listView.setDivider(null);
    Resources r = getResources();
    int px = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 8, r.getDisplayMetrics());
    listView.setDividerHeight(px);
    listView.setFadingEdgeLength(0);
    listView.setFitsSystemWindows(true);
    px = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 12, r.getDisplayMetrics());
    listView.setPadding(px, px, px, px);
    listView.setScrollBarStyle(ListView.SCROLLBARS_OUTSIDE_OVERLAY);
    listView.setAdapter(swingBottomInAnimationAdapter);

    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    getSupportActionBar().setTitle("Google cards social");
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    listView = (ListView) findViewById(R.id.listview);
    mCardAdapter = new CardAdapter(this);
    mCardAdapter.addAll(getItems());

    SwingBottomInAnimationAdapter bottom =
        new SwingBottomInAnimationAdapter(new SwipeDismissAdapter(mCardAdapter, this));
    bottom.setAbsListView(listView);
    listView.setAdapter(bottom);
  }
  private void createListView() {
    if (getView() != null) {
      SwingBottomInAnimationAdapter animationAdapter = new SwingBottomInAnimationAdapter(adapter);
      animationAdapter.setAbsListView(listView);
      listView.setAdapter(animationAdapter);

      mSwipeRefreshLayout.setRefreshing(false);
      mSwipeRefreshLayout.setOnRefreshListener(
          new SwipeRefreshLayout.OnRefreshListener() {
            @Override
            public void onRefresh() {
              processUserVariables();
            }
          });
      super.showSpinner(false);
      this.Filter(filter);
    }
  }
  private void initView(InvestmentActivity context) {
    this.context = context;

    LayoutInflater inflater =
        (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    inflater.inflate(R.layout.layout_investment_rush, this);

    initSwipeRefresh();

    rushListView = (ListView) this.findViewById(R.id.rushListView);

    qtLayout = new InvestmentQTLayout(this.context);
    rushListView.addHeaderView(qtLayout);

    rushAdapter = new VoteOfRushAdapter(this.context);

    swingBottomInAnimationAdapter = new SwingBottomInAnimationAdapter(rushAdapter);
    swingBottomInAnimationAdapter.setAbsListView(rushListView);
    swingBottomInAnimationAdapter
        .getViewAnimator()
        .setInitialDelayMillis(Constants.INITIAL_DELAY_MILLIS);
    rushListView.setAdapter(swingBottomInAnimationAdapter);
  }