A Tinder-like Android library to create the swipe cards effect. You can swipe left or right to like or dislike the content.

Related tags

UI/UX Swipecards
Overview

Swipecards

Travis master: Build Status

A Tinder-like cards effect as of August 2014. You can swipe left or right to like or dislike the content. The library creates a similar effect to Tinder's swipable cards with Fling animation.

It handles greatly asynchronous loading of adapter's data and uses the same layout parameters as FrameLayout (you may use android:layout_gravity in your layout xml file).


Installation

Maven Central

Go ahead find the latest version on Gradle please cowboy! Be sure to add the @aar suffix.

dependencies {
    compile 'com.lorentzos.swipecards:library:X.X.X@aar'
}

Example

The example is quite straightforward and documented in comments. You may find it under the relevant directory.

//implement the onFlingListener
public class MyActivity extends Activity {
    ...

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        ...

        //add the view via xml or programmatically
        SwipeFlingAdapterView flingContainer = (SwipeFlingAdapterView) findViewById(R.id.frame);

        al = new ArrayList<String>();
        al.add("php");
        al.add("c");
        al.add("python");
        al.add("java");

        //choose your favorite adapter
        arrayAdapter = new ArrayAdapter<String>(this, R.layout.item, R.id.helloText, al );
        
        //set the listener and the adapter
        flingContainer.setAdapter(arrayAdapter);
        flingContainer.setFlingListener(new SwipeFlingAdapterView.onFlingListener() {
            @Override
            public void removeFirstObjectInAdapter() {
                // this is the simplest way to delete an object from the Adapter (/AdapterView)
                Log.d("LIST", "removed object!");
                al.remove(0);
                arrayAdapter.notifyDataSetChanged();
            }

            @Override
            public void onLeftCardExit(Object dataObject) {
                //Do something on the left!
                //You also have access to the original object.
                //If you want to use it just cast it (String) dataObject
                Toast.makeText(MyActivity.this, "Left!", Toast.LENGTH_SHORT).show();
            }

            @Override
            public void onRightCardExit(Object dataObject) {
                Toast.makeText(MyActivity.this, "Right!", Toast.LENGTH_SHORT).show();
            }

            @Override
            public void onAdapterAboutToEmpty(int itemsInAdapter) {
                // Ask for more data here
                al.add("XML ".concat(String.valueOf(i)));
                arrayAdapter.notifyDataSetChanged();
                Log.d("LIST", "notified");
                i++;
            }
        });
        
        // Optionally add an OnItemClickListener
        flingContainer.setOnItemClickListener(new SwipeFlingAdapterView.OnItemClickListener() {
            @Override
            public void onItemClicked(int itemPosition, Object dataObject) {
                makeToast(MyActivity.this, "Clicked!");
            }
        });
    }
}

You can alternatively use a helpful method which sets in one line both the listeners and the adapter.

    // where "this" stands for the Context
    flingContainer.init(this, arrayAdapter);

Adding buttons is easy. Get the top card listener and trigger manually the right or left animation. On the end of the animation the above listeners (e.g. removeFirstObjectInAdapter) will be triggered depending on the direction.

    /**
     * Trigger the right event manually.
     */
    flingContainer.getTopCardListener().selectRight();

Tip: If you start a new Activity in the onItemClicked you will probably want to avoid double activity instances. If so these solutions might work for you: 1, 2 and I personally prefer 3

Configuration

You can optionally specify some attrs for the animation and the stack. The easiest way is in xml:

<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="4"
    app:min_adapter_stack="6" />

Or use styles:

<!-- Base application theme. -->
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
    <!-- Customize your theme here. -->
    <item name="SwipeFlingStyle">@style/SwipeFling</item>
</style>
  • rotation_degrees: the degrees of the card rotation offset
  • max_visible: the max visible cards at the time
  • min_adapter_stack: the min number of objects left. Initiates onAdapterAboutToEmpty() method.

License

   Copyright 2014 Dionysis Lorentzos

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

Android Arsenal

Comments
  • Adapter does not visible

    Adapter does not visible

    Hi, I try to implement your gradle libs to me project, but i have a little issue, SwipeFlingAdapterView does not visible in me view. I created custom BaseAdapter and set up it

    swipeFlingAdapterView.setAdapter(adapter);

    but nothing to show in layout except button

    bug 
    opened by eGorets 13
  • Complex card views result in skipped frames

    Complex card views result in skipped frames

    Animation stutters and logcat also reports skipped frames when using complexer card views.

    I/Choreographer﹕ Skipped 50 frames! The application may be doing too much work on its main thread.

    Any idea how to fix this? Txn! Great library BTW!

    bug 
    opened by sanderversluys 11
  • Cards are not visible from Json response objects

    Cards are not visible from Json response objects

    HI i have written my custom base adapter with json pojo and on succeful data retrieval i am setting the data to response object and response object to adapter and i have set the adapter to flingContainer like in the below code but i am not able to see the cards after i have parsed the data. please help on this

     client.get(getApplicationContext(), URL, new AsyncHttpResponseHandler() {
                @Override
                public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {
                    String ResponseStr = new String(responseBody);
                    gson = new Gson();
                    Log.d("LIST", ResponseStr);
                    responseObject = gson.fromJson(ResponseStr, SuggestionResponse.class);
                    Adapter = new CardAdapter(MainActivity.this, responseObject.getUsers());
                    flingContainer.setAdapter(Adapter);
    
                }
    
                @Override
                public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {
    
                }
            });
    

    And i have set the listners and implemented all the methods but still i am not able to see any out put let me know i can share my adapter class as well my adapter looks like

    import android.view.LayoutInflater;
    import android.content.Context;
    import android.view.View;
    import android.view.ViewGroup;
    import android.widget.BaseAdapter;
    import android.widget.ImageView;
    import android.widget.TextView;
    
    import com.dunst.flutter.R;
    import com.dunst.flutter.netwrok.models.SuggestionResponse;
    import com.squareup.picasso.Picasso;
    
    import java.util.List;
    
    /**
     * Created by Ashu on 26/09/15.
     */
    public class CardAdapter extends BaseAdapter {
    
        private List<SuggestionResponse.UsersEntity> mSuggestion;
        private Context mContext;
        private LayoutInflater inflater = null;
    
        public CardAdapter(Context mContext, List<SuggestionResponse.UsersEntity> mSuggestion) {
            this.mContext = mContext;
            this.mSuggestion = mSuggestion;
            inflater = ( LayoutInflater )mContext.
                    getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        }
    
        @Override
        public int getCount() {
            return mSuggestion.size();
        }
    
        @Override
        public Object getItem(int position) {
            return mSuggestion.get(position);
        }
    
        @Override
        public long getItemId(int position) {
            return 0;
        }
    
        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
            LayoutInflater inflater = (LayoutInflater) mContext
                    .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            View rowView = inflater.inflate(R.layout.each_card, parent, false);
            Holder holder = new Holder();
            holder.tv=(TextView) rowView.findViewById(R.id.textView1);
            holder.img=(ImageView) rowView.findViewById(R.id.imageView1);
            final SuggestionResponse.UsersEntity Suggestion = (SuggestionResponse.UsersEntity) getItem(position);
            holder.tv.setText(Suggestion.getFirstname());
            String Image_Url = Suggestion.getPhoto().get(0);
            Picasso.with(mContext).load(Image_Url).into(holder.img);
            rowView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    // TODO Auto-generated method stub
                }
            });
            return rowView;
        }
    
        public class Holder
        {
            TextView tv;
            ImageView img;
        }
    }
    
    opened by ashokslsk 10
  • How to handle child view click event

    How to handle child view click event

    I have a child's point of view, this is a picture, it's big. I'll give it a set the click event. But then the sliding event doesn't work. I want to do is to click on the image processing click event, sliding images to slide the whole card, Do you have what method? Thank you very much.

    opened by lushan1314 10
  • Cards not displaying properly

    Cards not displaying properly

    I tried creating a dummy example with 6 cards which only contain text. This is what they look like: screen shot 2014-11-12 at 8 56 56 pm

    xml:

    <RelativeLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".MyApp">
    
        <com.lorentzos.flingswipe.SwipeFlingAdapterView
            android:id="@+id/explore_cards"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#eee9e2"
            />
    
    </RelativeLayout>
    

    build.grade:

    compile 'com.android.support:support-v4:18.0.+'
    compile 'com.android.support:appcompat-v7:18.0.+'
    compile 'com.lorentzos.swipecards:library:1.0.7@aar'
    

    relevant pieces of java:

    SwipeFlingAdapterView swipeView = (SwipeFlingAdapterView) v.findViewById(R.id.explore_cards);
    tempArray = new ArrayList<String>();
    tempArray.add("hi");
    tempArray.add("hey");
    tempArray.add("yo");
    tempArray.add("blah");
    tempArray.add("hin");
    tempArray.add("heeeee");
    swipeView.setAdapter(arrayAdapter);
    swipeView.setFlingListener(this);
    
    ...........
    
    @Override
    public void removeFirstObjectInAdapter() {
        Log.i(LOG_TAG, "REMOVE FIRST");
        tempArray.remove(0);
        arrayAdapter.notifyDataSetChanged();;
    }
    
    @Override
    public void onLeftCardExit(Object o) {
        Log.i(LOG_TAG, "EXIT LEFT");
    }
    
    @Override
    public void onRightCardExit(Object o) {
        Log.i(LOG_TAG, "EXIT RIGHT");
    }
    
    @Override
    public void onAdapterAboutToEmpty(int i) {
        Log.i(LOG_TAG, "ABOUT TO EMPTY");
    }
    

    I suppose it's also worth mentioning that this is all placed inside a (support) Fragment. I also get a message in my XML file stating 'Failed to find style 'SwipeFlingStyle' in current theme'

    Any help would be appreciated, thanks a bunch!

    opened by ynnadkrap 8
  • Image on card underneath is not displayed when card above is partially swiped.

    Image on card underneath is not displayed when card above is partially swiped.

    Hi Diolor, first of, awesome library.

    I am using this library with images and some text. The issue is when a card is partially swiped, the image in the card underneath is not drawn. The image gets drawn only after the card above is fully swiped. This is not the case for the text underneath, the text is shown when the card is partially swiped. I want this behavior to apply for the image also.

    I'm trying to achieve something where you can sneak peek fully what's below the card.

    Please let me know if there's a solution to this.

    Cheers

    opened by uditmukherjee 7
  • How to custom swipe card include imageview and textview .

    How to custom swipe card include imageview and textview .

    Hi! Thank for great library. I tried to custom swipe card, I created new Adapter extend ArrayList, but It was not working. I checked all issue in this library, but I don't found. Please help me resolve this problem and give me some example about this. Thanks. best regards.

    opened by hvlong 6
  • This is not working with AsyncTask

    This is not working with AsyncTask

    I have used this with the AsyncTask and the custom adapter but it is not working.

    class LoadAllProducts extends AsyncTask<String, String, String> {
    
        @Override
        protected void onPreExecute() {
            super.onPreExecute();
    
            pDialog = new ProgressDialog(MainActivity.this);
            pDialog.setMessage("Loading products. Please wait...");
            pDialog.setIndeterminate(false);
            pDialog.setCancelable(false);
            pDialog.show();
    
        }
    
        protected String doInBackground(String... args) {
            // Building Parameters
            List<NameValuePair> params = new ArrayList<NameValuePair>();
    
            params.add(new BasicNameValuePair("id", "1"));
    
            // getting JSON string from URL
            JSONObject json = jParser.makeHttpRequest(url_all_products, "GET",
                    params);
    
            flingContainer.removeAllViewsInLayout();
    
            al.clear();
            al = new ArrayList<Product>();
    
            try {
                // Checking for SUCCESS TAG
                int success = json.getInt(TAG_SUCCESS);
    
                if (success == 1) {
                    // products found
                    // Getting Array of Products
                    products = json.getJSONArray(TAG_PRODUCTS);
                    al = new ArrayList<Product>();
                    // looping through All Products
                    Product pp;
                    for (int i = 0; i < products.length(); i++) {
    
                        JSONObject c = products.getJSONObject(i);
    
                        // Storing each json item in variable
    
                        name = c.getString(TAG_NAME);
    
                        pp = new Product();
    
                        pp.portal = c.getString(TAG_NAME);
    
                        al.add(pp);
                        pp = null;
    
                    }
    
                } else {
    
                }
    
            } catch (JSONException e) {
                e.printStackTrace();
            }
    
            return null;
        }
    
        protected void onPostExecute(String file_url) {
            // dismiss the dialog after getting all products
            pDialog.dismiss();
    
            arrayAdapter = new ProductAdpater(MainActivity.this, R.layout.item,
                    al);
    
            flingContainer.setAdapter(arrayAdapter);
    
        }
    }
    

    and my custom adapter:

    private class ProductAdpater extends ArrayAdapter<Product> {
    
        Activity mContext;
    
        public ProductAdpater(Activity context, int resourceId,
                List<Product> items) {
            super(context, resourceId, items);
    
            try {
                this.mContext = context;
    
            } catch (Exception e) {
    
                e.printStackTrace();
            }
    
        }
    
        @Override
        public int getCount() {
            // TODO Auto-generated method stub
            return al.size();
        }
    
        @Override
        public long getItemId(int position) {
            // TODO Auto-generated method stub
            return position;
        }
    
        public View getView(final int position, View convertView,
                ViewGroup parent) {
    
            View view = convertView;
            ViewHolder holder = null;
    
            LayoutInflater mInflater = (LayoutInflater) mContext
                    .getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
            if (view == null) {
                view = mInflater.inflate(R.layout.item, parent, false);
                holder = new ViewHolder();
                holder.imgIcon = (ImageView) view
                        .findViewById(R.id.img_product);
                holder.imageLeft = (ImageButton) view
                        .findViewById(R.id.img_delete);
                holder.imageRight = (ImageButton) view
                        .findViewById(R.id.img_wish);
    
                holder.tvBrand = (TextView) view.findViewById(R.id.tv_brand);
                holder.tvPortal = (TextView) view.findViewById(R.id.tv_portal);
    
                view.setTag(holder);
            } else
                holder = (ViewHolder) view.getTag();
    
            holder.imgIcon.setImageDrawable(getResources().getDrawable(
                    R.drawable.amazon));
    
            // your image url
            String url = "http://javatechig.com/wp-content/uploads/2014/05/UniversalImageLoader-620x405.png";
    
            ImageLoader imageLoader = ImageLoader.getInstance();
    
            // ImageView imageView = (ImageView) findViewById(R.id.img_product);
    
            imageLoader.displayImage(url, holder.imgIcon);
    
            holder.imageLeft.setOnClickListener(new OnClickListener() {
    
                @Override
                public void onClick(View v) {
                    // TODO Auto-generated method stub
                    flingContainer.getTopCardListener().selectLeft();
                }
            });
            holder.imageRight.setOnClickListener(new OnClickListener() {
    
                @Override
                public void onClick(View v) {
                    // TODO Auto-generated method stub
                    flingContainer.getTopCardListener().selectRight();
                }
            });
    
            holder.tvPortal.setText((al.get(position).portal));
            return view;
        }
    
        class ViewHolder {
    
            ImageView imgIcon;
            ImageButton imageLeft, imageRight;
            TextView tvPrice, tvPortal, tvBrand;
    
        }
    
    }
    

    It is shows the ProgressDialog dialog but after completing doInBackgrond task it is not display anything. Even there is not error log .

    How can i solved this?

    opened by rushank 6
  • Custom Adapter instead of Array Adapter?

    Custom Adapter instead of Array Adapter?

    Hi,

    I've created a custom adapter to use with my object rather than the simple ArrayAdapter since I need some extra fields, however, not all of my custom fields are showing up on the swipecard.

    With the following code the title, company name and description fields are correctly populated onto my card but not the others, even though the fields are there. No errors from the debugger and everything works fine but they just don't show up!!! What am I missing?

    Here is what I am doing in my activity:

    At the top of the activity: @InjectView(R.id.frame) SwipeFlingAdapterView flingContainer;

    In my AsyncTask:

    arrayAdapter = new JobAdapter(getApplicationContext(), R.layout.jobcard, result);
    flingContainer.setAdapter(arrayAdapter);
    

    Yes: the result ArrayList is populated with values.

    My adapter:

    
    public View getView(int position, View convertView, ViewGroup parent) {
            View row = convertView;
            ViewHolder holder = null;
    
            LayoutInflater inflater = (LayoutInflater) context.getSystemService((Activity.LAYOUT_INFLATER_SERVICE));
    
            if (row == null) {
                row = inflater.inflate(layoutResourceId, parent, false);
                //row = inflater.inflate(layoutResourceId, null);
    
                holder = new ViewHolder();
                holder.title = (TextView)row.findViewById(R.id.tv_jobTitle);
                holder.payrate = (TextView)row.findViewById(R.id.tv_payRate);
                holder.startdate = (TextView)row.findViewById(R.id.tv_startDate);
                holder.workinghrs = (TextView)row.findViewById(R.id.tv_duration);
                holder.location = (TextView)row.findViewById(R.id.tv_location);
                holder.companyname = (TextView)row.findViewById(R.id.tv_companyName);
                holder.description = (TextView)row.findViewById(R.id.tv_JobDesc);
                holder.equipment = (TextView)row.findViewById(R.id.tv_equipmentReq);
                holder.experience = (TextView)row.findViewById(R.id.tv_experienceReq);
    
                row.setTag(holder);
            } else {
                holder = (ViewHolder)row.getTag();
            }
    
            Job j = jobs.get(0);
    
            holder.title.setText(j.getJobTitle());
            holder.payrate.setText(j.getPayrate());
            holder.startdate.setText(j.getDurationStart());
            holder.workinghrs.setText(j.getWorkingHrs());
            holder.location.setText(j.getLocation());
            holder.companyname.setText("ABC Company");
            holder.description.setText(j.getDescription());
            holder.equipment.setText("Hardhat");
            holder.experience.setText("3-5 years");
    
            return row;
        }
        static class ViewHolder
        {
            TextView title;
            TextView payrate;
            TextView startdate;
            TextView workinghrs;
            TextView location;
            TextView companyname;
            TextView description;
            TextView equipment;
            TextView experience;
        }
    

    And finally, my jobcard.xml layout:

    <?xml version="1.0" encoding="utf-8"?>
    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_gravity="center"
        android:layout_width="match_parent"
        android:layout_height="400dp"
        android:padding="20dp">
    
        <LinearLayout
            android:id="@+id/mainCardLayout"
            android:layout_width="match_parent"
            android:layout_height="340dp"
            android:layout_gravity="center"
            android:orientation="vertical"
            android:weightSum="1"
            android:background="#ffffff">
    
            <TextView
                android:id="@+id/tv_jobTitle"
                android:background="#ffffff"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:padding="10dp"
                android:textStyle="bold"
                android:textSize="16sp"
                android:textColor="#474747"
                android:textAlignment="center"
                tools:text="Cement Pouring Guy"
                android:layout_gravity="center_horizontal"/>
    
            <TextView
                android:id="@+id/tv_companyName"
                android:background="#ffffff"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="14sp"
                android:textColor="#474747"
                android:textAlignment="center"
                tools:text="ABC Company"
                android:layout_gravity="center_horizontal" />
    
            <LinearLayout
                android:id="@+id/cardHeader"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_marginTop="20dp">
    
                <TextView
                    android:id="@+id/tv_experienceReq"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:padding="15dp"
                    android:layout_marginLeft="10dp"
                    tools:text="3-5 years" />
    
                <View
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    android:layout_weight="1" />
    
                <TextView
                    android:id="@+id/tv_location"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:padding="15dp"
                    tools:text="Langley, BC" />
    
                <View
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    android:layout_weight="1" />
    
                <TextView
                    android:id="@+id/tv_payRate"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:padding="15dp"
                    android:layout_marginRight="10dp"
                    tools:text="125/day" />
    
            </LinearLayout>
    
            <TextView
                android:id="@+id/tv_JobDesc"
                android:textSize="14sp"
                android:textColor="#474747"
                android:background="#f3f3f3"
                tools:text="Pour Cement, Mix Cement, Level Cement and go pick up cement bags."
                android:layout_width="match_parent"
                android:layout_height="150dp"
                android:padding="15dp" />
    
            <LinearLayout
                android:id="@+id/additionalInfo"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center" >
    
                <TextView
                    android:id="@+id/tv_startDate"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:padding="15dp"
                    android:layout_marginLeft="10dp"
                    tools:text="June 1, 2016" />
    
                <View
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    android:layout_weight="1"
                    />
    
                <TextView
                    android:id="@+id/tv_duration"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:padding="15dp"
                    tools:text="8h" />
    
                <View
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    android:layout_weight="1"
                    />
    
                <TextView
                    android:id="@+id/tv_equipmentReq"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:padding="15dp"
                    android:layout_marginRight="10dp"
                    tools:text="Hardhat" />
    
            </LinearLayout>
    
        </LinearLayout>
    
        <View
            android:id="@+id/item_swipe_left_indicator"
            android:alpha="0"
            android:layout_width="20dp"
            android:layout_height="20dp"
            android:layout_margin="20dp"
            android:background="#A5F" />
    
        <View
            android:id="@+id/item_swipe_right_indicator"
            android:alpha="0"
            android:layout_width="20dp"
            android:layout_height="20dp"
            android:layout_margin="20dp"
            android:layout_gravity="right"
            android:background="#5AF" />
    
    </FrameLayout>
    

    Thanks for the help!

    opened by thofnar 5
  • Card with scrollview

    Card with scrollview

    Hi!

    I must use an scrollview into the card to show all the information, but the drag action is not possible.

    Do you know how can I achieve this?

    Thanks!

    question wontfix 
    opened by franrc 5
  • how to create stack.

    how to create stack.

    I want to create a stack of 3 cards to be shown at once i.e little layer of below card to be shown. So user get to know that there is more cards below.

    Your library do have methods of class SwipeFlingAdapterView but these doesn't work or this indicate something different that I am not able to understand.

    1. setMinStackInAdapter(3);
    2. setMaxVisible(3);

    Please help if there is any method regarding this.

    Thanks in Advance.

    opened by harminderclabs 5
  • How to display text while dragging image?

    How to display text while dragging image?

    Just wanted to know how will I get X and Y coordinates position of image while dragging it. Please help me to display any text on top of image while dragging in progress, remember while dragging itself not after image swiped already left or right. In card I must override onTouchListener and I want to pass touch event programatically. Thanks in advance.

    opened by avibaghel 0
  • How to update the button state in top  card?

    How to update the button state in top card?

    Hi,

      In my app app i have one play button in each card.When i click play button in card,i need to update the play button to pause.i called notifydatasetchanged.But it didn't refresh .Any solution to update the card?
    
    opened by kanivel 0
Owner
Dionysis Lorentzos
Android developer at @sharenowTech. Passionate about automotive industry, innovation and space.
Dionysis Lorentzos
Created a Tinder like Card Deck & Captain Train like Toolbar

TinderView Created A Simple and Beautiful Tinder like card deck & Captain Train like toolbar. This is heavily based on AndroidSwipeableCardStack, wenc

Aradh Pillai 328 Jun 18, 2022
A tinder like swipeable card stack component

AndroidSwipeableCardStack Change log: provide option to infinitly swipe in a loop card rotation setting card gravity setting undo animation Thanks for

wenchao jiang 824 Nov 10, 2022
ScratchView 7.0 0.0 L4 Java repo is UX Design involving scratch cards like views which are scratched to reveal the information they conceal.

ScratchView Intro ScratchView repo is UX Design involving scratch cards like views which are scratched to reveal the information they conceal. There a

Harish Sridharan 1.1k Dec 24, 2022
ScratchView repo is UX Design involving scratch cards like views which are scratched to reveal the information they conceal.

ScratchView Intro ScratchView repo is UX Design involving scratch cards like views which are scratched to reveal the information they conceal. There a

Harish Sridharan 1.1k Dec 24, 2022
A View on which you can freely draw, customizing paint width, alpha and color, and take a screenshot of the content. Useful for note apps, signatures or free hand writing.

FreeDrawView A View that let you draw freely on it. You can customize paint width, alpha and color. Can be useful for notes app, signatures or hands-f

Riccardo Moro 643 Nov 28, 2022
Android StackBlur is a library that can perform a blurry effect on a Bitmap based on a gradient or radius, and return the result. The library is based on the code of Mario Klingemann.

Android StackBlur Android StackBlur is a library that can perform a blurry effect on a Bitmap based on a gradient or radius, and return the result. Th

Enrique López Mañas 3.6k Dec 29, 2022
Sliding cards with pretty gallery effects.

SlidingCard Sliding cards with pretty gallery effects. Download Include the following dependency in your build.gradle file. Gradle: repositories {

mxn 681 Sep 7, 2022
This project created just for help developer who want to and ability of read VISA, UNION PAY, HUMO, ATTO and some other cards data read.

If you enjoy my content, please consider supporting what I do. Thank you. By me a Coffee To get a Git project into your build: Step 1. Add the JitPack

Fozilbek Imomov 1 Oct 15, 2022
Android library which allows you to swipe down from an activity to close it.

Android Sliding Activity Library Easily create activities that can slide vertically on the screen and fit well into the Material Design age. Features

Jake Klinker 1.3k Nov 25, 2022
This is a android custom view , like a scratch card effect!

ScratchView This is a android custom view , like a scratch card effect! Last Update 采纳DearZack童鞋的优化思路,把计算擦除面积比例的操作放在手指离开屏幕时,以降低对CPU的占用。 Articles Scrat

D_clock爱吃葱花 316 Nov 29, 2022
A simple implementation of swipe card like StreetView

A simple implementation of swipe card like StreetView!! DONATIONS This project needs you! If you would like to support this project's further developm

Michele Lacorte 831 Jan 4, 2023
Android View that displays different content based on its state

MultiStateView Android View that displays different content based on its state. Based off of MeetMe/MultiStateView The four different states the view

Kenny 1.2k Dec 16, 2022
Rn-scratch-card - React Native Scratch Card which temporarily hides content from user

rn-scratch-card React Native Scratch Card which temporarily hides content from a

Sweatcoin 54 Jan 4, 2023
A TagView library for Android. Customize your own & Drag effect.

AndroidTagView An Android TagView library. You can customize awesome TagView by using this library. Screenshots Usage Step 1 Add below dependency in y

lujun 1.7k Dec 29, 2022
Android Library to implement simple touch/tap/swipe gestures

SimpleFingerGestures An android library to implement simple 1 or 2 finger gestures easily Example Library The library is inside the libSFG folder Samp

Arnav Gupta 315 Dec 21, 2022
Android swipe-to-dismiss mini-library and sample code

Android Swipe-to-Dismiss Sample Code Sample code that shows how to make ListView or other views support the swipe-to-dismiss Android UI pattern. See t

Roman Nurik 1.3k Dec 29, 2022
Android jetpack compose swipe library

Swiper for Android Jetpack Compose Android Jetpack Compose swipe library. Downlo

null 32 Dec 10, 2022
Android view that allows the user to create drawings. Customize settings like color, width or tools. Undo or redo actions. Zoom into DrawView and add a background.

DrawView Android view that allows the user to create drawings. Draw anything you like in your Android device from simple view. Customize draw settings

Oscar Gilberto Medina Cruz 839 Dec 28, 2022
Code Guide: How to create Snapchat-like image stickers and text stickers.

MotionViews-Android Code Guide : How to create Snapchat-like image stickers and text stickers After spending 2000+ hours and releasing 4+ successful a

Uptech 474 Dec 9, 2022