use of com.a5corp.weather.cards.AboutCard in project Weather by Sparker0i.
the class AboutActivity method initCards.
public void initCards() {
cards = new ArrayList<>();
cards.add(new AboutCard(this, R.layout.about_card_layout_1, 1));
cards.add(new AboutCard(this, R.layout.about_card_layout_2, 2));
cards.add(new AboutCard(this, R.layout.about_card_layout_3, 3));
cards.add(new AboutCard(this, R.layout.about_card_layout_4, 4));
cards.add(new AboutCard(this, R.layout.about_card_layout_5, 5));
cardArrayAdapter = new CardArrayAdapter(this, cards);
if (aboutList != null) {
aboutList.setAdapter(cardArrayAdapter);
aboutList.setOnScrollListener(new SwipeOnScrollListener() {
@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
if (firstVisibleItem > previousVisibleItem)
fab.hide();
else if (firstVisibleItem < previousVisibleItem)
fab.show();
previousVisibleItem = firstVisibleItem;
}
});
}
}
Aggregations