Skip to content
This repository was archived by the owner on Jul 22, 2019. It is now read-only.
This repository was archived by the owner on Jul 22, 2019. It is now read-only.

SwipeStack is not Visible #64

@SimonPeter1909

Description

@SimonPeter1909

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions