I\'m using ActionBarSherlock and I\'m trying to customize the activatedBackgroundIndicator attribute for the row background.
If I use the l
Finally I found the solution to the problem.
It was the context used in the row adapter. The constructor used is the shown in the following piece of code:
public RowAdapter(Activity activity, ArrayList<String> list) {
this.mContext = activity.getApplicationContext();
this.elements = list;
this.theActivity = activity;
this.inflater = (LayoutInflater) this.mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
Just changing the context from:
this.mContext = activity.getApplicationContext()
(Application-Context)
to
this.mContext = activity.getBaseContext()
(Activity-Context)
solved the problem and now the background is the custom one.
Whenever you need to manipulate Views then go for Activity-Context, else Application-Context would be enough.
This answer helped me to understand why to use getBaseContext() instead of getApplicationContext() in my case.