First of all, I suggest you try the different sizes of the icon you want, without scrolling, until you reach your goal. If this does not suit you, you can add a custom view to the action bar and set OnClickListener to the button and achieve your goal. Here's how to do it:
View customNav = LayoutInflater.from(this).inflate(R.layout.my_button, null); // layout which contains your button. Button mButton = (Button) customNav.findViewById(R.id.date_num); mButton.setOnClickListener(this); getSupportActionBar().setCustomView(customNav); getSupportActionBar().setDisplayShowCustomEnabled(true);
That should do the trick. To achieve this, you can use Button or ImageButton.
hardartcore Apr 29 '13 at 8:28 2013-04-29 08:28
source share