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

OnClick select app #1

Open
davidgamez604 opened this issue Jan 19, 2019 · 1 comment
Open

OnClick select app #1

davidgamez604 opened this issue Jan 19, 2019 · 1 comment

Comments

@davidgamez604
Copy link

How to open another installed app with a onclick listener, for example when I click on settings it go to setting, or when I click on apps it go to all apps?

Can you please let me know where I should do the changes?
Thanks

@tracyliu1
Copy link
Owner

mLoopLayout.mImageView03.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(MainActivity.this, mSelectNames[index], Toast.LENGTH_SHORT).show(); } });

you can implement what you want to do in onclick();

mLoopLayout.setOnItemSelectListener(new LoopLayout.OnItemSelectListener() { @Override public void onItemselect(int position) { index = position; } });

the value index is used for distinguish different apps . setOnItemSelectListener() is used for sync index.

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

No branches or pull requests

2 participants