8

Android ActionBar JButton onClickListener does not work

view full story
linux-howto

http://stackoverflow.com – I'm working on a FormFactory class. I have an JButton which is part of an ActionBar. I need listen for clicks on the JButton, but the ActionBar is listening. How do I get the ActionBar to pass the message to the JButton? ActionBar actionBar = new ActionBar(this); actionBar.setText("Profile"); JButton jButtonLeft = new JButton(getApplicationContext(), R.drawable.back_icon, R.drawable.back_icon); jButtonLeft.setText("Back"); jButtonLeft.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { Intent intent = new Intent(DisplayShopName (HowTos)