This repository was archived by the owner on Jul 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 222
This repository was archived by the owner on Jul 22, 2019. It is now read-only.
SwipeStack is not Visible #64
Copy link
Copy link
Open
Description
I would like to implement Swipe Stack View in my layout I have done all the things perfect yet I cant the SwipeStackView is not visible in my layout... Should the StackVIew be single in the Activity?
Stack View inside layout and i have set android:clipChildren="false" in parent View.
<link.fls.swipestack.SwipeStack
android:layout_gravity="center"
android:id="@+id/swipe_deck"
app:disable_hw_acceleration="false"
android:layout_width="match_parent"
android:layout_height="150dp"
app:stack_rotation="10"
app:stack_size="3" />
This is how i have installed in my java file
swipeDeck = findViewById(R.id.swipe_deck);
swipeDeck.setAdapter(new SwipeLayoutAdapter(todayMeetingModelList));
swipeDeck.setListener(new SwipeStack.SwipeStackListener() {
@Override
public void onViewSwipedToLeft(int position) {
}
@Override
public void onViewSwipedToRight(int position) {
}
@Override
public void onStackEmpty() {
swipeDeck.resetStack();
}
});
and this is how i set the adapter
public class SwipeLayoutAdapter extends BaseAdapter{
private List<TodayMeetingModel> todayMeetingModelList;
public SwipeLayoutAdapter(List<TodayMeetingModel> todayMeetingModelList) {
this.todayMeetingModelList = todayMeetingModelList;
}
@Override
public int getCount() {
return todayMeetingModelList.size();
}
@Override
public Object getItem(int position) {
return todayMeetingModelList.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView==null) convertView = getLayoutInflater().inflate(R.layout.card_view_today_club_meeting,parent,false);
TodayMeetingModel todayMeetingModel = todayMeetingModelList.get(position);
TextView clubNameTV = convertView.findViewById(R.id.clubMeetingNameTV);
clubNameTV.setText(todayMeetingModel.getClub_name());
TextView timeTV = convertView.findViewById(R.id.timeTV);
timeTV.setText(todayMeetingModel.getClub_meeting_time());
TextView dateTV = convertView.findViewById(R.id.dateTV);
dateTV.setText(todayMeetingModel.getDay_name());
TextView addressTV = convertView.findViewById(R.id.clubAddressTV);
addressTV.setText(todayMeetingModel.getClub_address());
return convertView;
}
}
My problem is the SwipeStackView is not Visible on the screen...
Metadata
Metadata
Assignees
Labels
No labels