Library Used:
Question:
I have been trying to implement highlighting on the menudrawer similar to YouTube/Beautiful Widget app, but i have no clue to how is should approach the problem.
below i am giving a sample to my aprproche which i am not sure, if its the correct way to implement something like this:
This is a Menu drawer Adaptervew.click lisner i created:
private AdapterView.OnItemClickListener mItemClickListener = new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position,
long id) {
mPreviousView=mActiveView;
mActiveView=view;
mActivePosition = position;
// mDrawer.setActiveView(view, position);
TextView txtview=(TextView)mActiveView;
txtview.setBackgroundResource( R.drawable.abs__cab_background_top_holo_dark);
// mDrawer.closeMenu();
}
};
So basically what i am trying to do here is to use a .9 image on the current selected view!
What i want to know is is there a more systematic or better approach to do the same!
What i want to achive Screen Shots below::
You can give it a try:
public View getView(int position, View convertView, ViewGroup parent) {
view.setSelectionHandlerColorResource(Set your color here);
}