How to implement Actionbar and Viewpager as in Tinder

Asked

Viewed 132 times

2

I need to implement a ActionBar and ViewPager as in Tinder.

When Tinder opens, you can slide through all the tabs.

The second tab is a ListView or a ListFragment and when you touch an item, it is taken to another series of tabs. You can slide back and will be in the previous series of tabs.

How can I do it softly and elegantly?

inserir a descrição da imagem aqui

  • How about putting some pictures? Not everyone here has or can have Tinder on their cell phone. :)

  • I will put pictures. Thank you very much Pablo for the suggestion.

  • As well, Whatsapp style tabs too?

  • Flaps like in Whatsapp. Unlike Whatsapp however, as #1- the tabs in Whatsapp form a tabbar below the actionbar and in Tinder the tabs form a tabbar inside the actionbar; #2- whatspp has only 3 tabs simply and has no navigation Drawer. The Tinder has a group (a) of 4 tabs and if you touch an item of the second tab that is a listview or listfragment vc and' taken to a group (b) of two tabs. The first tab and' a chat like Whatsapp and the second tab and' a horizontal scrollview of the photos that the person made available. #3- when you slide back from group 9

  • Tabs as in Whatsapp. However Whatsapp: #1- has tabs that form a tabbar below the actionbar ; Tinder has tabs inside the actionbar. #2- whatspp has 3 tabs and no navigation Drawer. Tinder has 1 group (a) of 4 tabs - vc touches an item of 2a. tab that is a listview or listfragment vc goes for a group (b) of 2 tabs. in the group (b) - 1a. tab and' a chat - 2a. tab and' 1 horizontal scrollview. #3- qdo vc slides back from the group (b) vc back to the group’s no 2 tab (a) and to the group’s no 1 tab (a). The transition is perfect between groups (a) and (b). #4- Tinder has navigation Drawer.

1 answer

0

I selected this Lib : Cardstackview

Mode of use

Declare the layout

<com.yuyakaido.android.cardstackview.CardStackView
    android:id="@+id/activity_main_card_stack"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="30dp"
    android:clipChildren="false"
    android:clipToPadding="false"/>

Now implement the Reverse Button.

final CardStackView cardStackView = (CardStackView) findViewById(R.id.activity_main_card_stack_view);
cardStackView.setAdapter(adapter);

View reverseButton = findViewById(R.id.activity_main_reverse_button);
reverseButton.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        cardStackView.reverse();
    }
});

This is the simplest way to implement, but the link above has explanations of custom deployments.

  • Thank you very much Thiago. I will check. But there can be no boot. It has to be the same thing as Tinder. Only swiping.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.