private String[] buildListNavData(List<GroupBean> list) { List<String> name = new ArrayList<String>(); name.add(getString(R.string.all_people)); name.add(getString(R.string.bilateral)); for (GroupBean b : list) { name.add(b.getName()); } String[] valueArray = name.toArray(new String[0]); return valueArray; }
@Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { super.onCreateOptionsMenu(menu, inflater); inflater.inflate(R.menu.actionbar_menu_friendstimelinefragment, menu); name = menu.findItem(R.id.group_name); if (selectedId.equals("0")) { name.setTitle(userBean.getScreen_name()); } if (selectedId.equals("1")) { name.setTitle(getString(R.string.bilateral)); } else { for (GroupBean b : GlobalContext.getInstance().getGroup().getLists()) { if (b.getIdstr().equals(selectedId)) { name.setTitle(b.getName()); return; } } } }