Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicklisteners to the menu icons #11

Closed
pkanyerezi opened this issue Feb 8, 2017 · 2 comments
Closed

Clicklisteners to the menu icons #11

pkanyerezi opened this issue Feb 8, 2017 · 2 comments
Labels

Comments

@pkanyerezi
Copy link

Hey,

After using:
<com.cleveroad.loopbar.widget.LoopBarView
android:id="@+id/endlessView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:enls_placeholderId="@id/placeHolder"
app:enls_orientation="horizontal"
app:enls_selectionGravity="start"
app:enls_selectionMargin="10dp"
app:enls_overlaySize="5dp"
app:enls_selectionInAnimation="@animator/enls_scale_restore"
app:enls_selectionOutAnimation="@animator/enls_scale_small"
app:enls_selectionBackground="@android:color/holo_blue_dark"
app:enls_menu="@menu/loopbar"
app:enls_scrollMode="auto"
/>

in my xml.

How do i set onclicklistener on the menu icon in my main activity.
Am really stuck here.
thanks

@Iojjj
Copy link

Iojjj commented Feb 9, 2017

Hi @pkanyerezi,

I guess it should be something like this:

final LoopBarView loopBarView = findViewById(R.id.endlessView);
...
loopBarView.addOnItemClickListener(new com.cleveroad.loopbar.widget.OnItemClickListener() {
    @Override
    public void onItemClicked(int position) {
        // item clicked
    }
});

@Iojjj Iojjj added the question label Feb 9, 2017
@Iojjj
Copy link

Iojjj commented Feb 10, 2017

@pkanyerezi, if my answer helped you, mark this issue as closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants