Answer the question
In order to leave comments, you need to log in
How to read attributes set in menu markup in ActionView?
The situation is quite trivial. The project uses ActionBarSherlock.
There is an XML file with menu markup for the bar:
<item
android:id="@+id/id"
android:actionViewClass="com.my.package.CustomView"
android:icon="@drawable/icon"
android:showAsAction="always"
android:title="@string/title"/>
CustomView v = ((CustomView) menu.findItem(R.id.refresh).getActionView());
v.setTitle(R.string.title);
v.setIcon(R.drawable.icon);
// ...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question