I am using this code to set ListView divider with hex color and it doesnot work!!
ListView list = (ListView) act.findViewById(R.id.menu_listview);
SlideMenuItem[] items = menuItemList
.toArray(new SlideMenuItem[menuItemList.size()]);
SlideMenuAdapter adap = new SlideMenuAdapter(act, items, font);
// side menu divider color
list.setDivider(new ColorDrawable(Color.parseColor("#000000")));
list.setAdapter(adap);
"It doesn't work" is no problem description, but I guess the divider is not appearing... try :
list.setDividerHeight( xyz );
...and make sure everything else isn't black as well.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.