Click here to Skip to main content
15,910,234 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a toolbar that has a back icon on its left most side, i need to create an onClickListener for it. the code that i used has no effect on clicking on that icon.

Java
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    
                    Intent main = new Intent(getApplicationContext(), WelcomaePAge.class);
                    startActivity(main);
                }
            });


Please help me to figure out my mistake
Posted

1 solution

 
Share this answer
 
Comments
Rahul Ramakrishnan 9-Sep-15 7:18am    
i did try it out but no effect.still same result
Richard MacCutchan 9-Sep-15 7:45am    
Sorry, but you have not provided enough information for anyone to guess what is missing from your code. Please try some further test, ensure you have all the required items in your toolbar and have set all the handlers and options in your code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900