
Please refer to the attached image.
setListNavigationCallbacks(mSpinne
Here is the solution. We need to create a different method for getView(...) and also need to keep track on the item selected from drop down. Once the item from navigation drawer is clicked call a new method (create new method in spinner adapter as update title) llike
public void setHeaderTitle(String str) {
titleTxt = str;
}
Different method called from get view
@Override
public View getView(int position, View convertView, ViewGroup parent) {
return getBarView(position);
}
private View getBarView(int position) {
if (displayHolder == null) {
LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView1 = inflater.inflate(R.layout.actionbar_spinner_item, null);
displayHolder = new ViewHolder();
}
displayHolder.txt01 = (TextView) convertView1.findViewById(R.id.actionBarTitle123);
displayHolder.txt02 = (TextView) convertView1.findViewById(R.id.actionBarSubTitle123);
displayHolder.txt01.setText(titleTxt);
displayHolder.txt02.setText(items[curPos]);
return convertView1;
}
And when drop down item is selected call below method
public void setHeaderSubTitle(int pos) {
// update display of sub title
curPos = pos;
getBarView(pos);
}
Let me know anything more is needed