Java Code Examples for android.widget.ListView#setHeaderDividersEnabled()

The following examples show how to use android.widget.ListView#setHeaderDividersEnabled() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
private void setupListView() {
    mListView = (ListView) findViewById(R.id.list);

    mPackageList = new ArrayList<>();
    mPackageAdapter = new PackageItemAdapter(this, mPackageList);
    mListView.setAdapter(mPackageAdapter);
    mListView.setHeaderDividersEnabled(false);

    mListView.setOnScrollListener(this); // not show fast scroll always
    mListView.setOnItemClickListener(this);
}
 
Example 2
@Override
protected ListView createRefreshableView(Context context, AttributeSet attrs) {
	ListView lv = createListView(context, attrs);

	// Set it to this so it can be used in ListActivity/ListFragment
	lv.setId(android.R.id.list);
	lv.setHeaderDividersEnabled(false);
	
	return lv;
}
 
Example 3
Source Project: MemoryCleaner   File: SettingFragment.java    License: Apache License 2.0 5 votes vote down vote up
@Override public void initPreferenceListView(View view) {
    ListView listView = (ListView) view.findViewById(android.R.id.list);
    listView.setHorizontalScrollBarEnabled(false);
    listView.setVerticalScrollBarEnabled(false);
    listView.setDivider(
            new ColorDrawable(getResources().getColor(R.color.grey)));
    listView.setDividerHeight((int) getResources().getDimension(
            R.dimen.preference_divider_height));
    listView.setFooterDividersEnabled(false);
    listView.setHeaderDividersEnabled(false);
}
 
Example 4
@Override
public
View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
    m_listView = (ListView) inflater.inflate(R.layout.navigation_drawer, container, false);
    m_listView.setOnItemClickListener(new OnNavigationItemClick());
    m_listView.setHeaderDividersEnabled(false);

    String[] navTitles = getResources().getStringArray(R.array.navigation_titles);

    for(int i = 0; i < navTitles.length; i++)
    {
        ViewNavItem item = new ViewNavItem(getActivity());
        item.m_text = navTitles[i];
        item.m_count = "";
        item.m_image = i;
        m_listView.addHeaderView(item);
    }

    TextView divider = (TextView) inflater.inflate(R.layout.navigation_divider, container, false);
    divider.setText(R.string.tags);

    m_listView.addHeaderView(divider, null, false);
    m_listView.setAdapter(new AdapterNavigationDrawer(getActivity()));

    return m_listView;
}
 
Example 5
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
    final View view = inflater.inflate(R.layout.full_results_list, container, false);
    final View header = View.inflate(getActivity(), R.layout.full_results_list_header, null);
    final TextView term = (TextView) header.findViewById(R.id.term);
    final ListView list = (ListView) view.findViewById(android.R.id.list);
    term.setText(Html.fromHtml("&ldquo;" + currentSearchTerm + "&rdquo;"));
    list.addHeaderView(header);
    list.setHeaderDividersEnabled(false);
    setListAdapter(new PlaceArrayAdapter(getActivity(), features));
    return view;
}
 
Example 6
@Nullable @Override public View onCreateView(
      LayoutInflater inflater,
      @Nullable ViewGroup container,
      @Nullable Bundle savedInstanceState)
{
    View view = super.onCreateView(inflater, container, savedInstanceState);
    if (view == null) {
        return view;
    }


    TextView addEditTitle = (TextView) view.findViewById(R.id.care_add_edit_title);
    Bundle arguments = getArguments();
    if (arguments != null) {
        isEditMode = arguments.getBoolean(IS_EDIT, false);
        modelIDToEdit = arguments.getString(ID);
    }
    if (addEditTitle != null && arguments != null) {
        addEditTitle.setText(arguments.getString(DESCRIPTION, ""));
        addEditTitle.setTextColor(isEditMode ? getResources().getColor(R.color.white) : getResources().getColor(R.color.black));
    }

    setWallpaper();

    addEditButton = (Version1Button) view.findViewById(R.id.care_add_edit_save);
    if (addEditButton != null) {
        addEditButton.setColorScheme(isEditMode ? Version1ButtonColor.WHITE : Version1ButtonColor.BLACK);
    }

    behaviorSettingsListView = (ListView) view.findViewById(R.id.care_add_edit_behavior_lv);
    behaviorSettingsListView.setHeaderDividersEnabled(false);
    behaviorSettingsListView.setFooterDividersEnabled(false);

    oopsText = view.findViewById(R.id.behavior_ineligible);

    View divider = view.findViewById(R.id.divider);
    if (divider != null && isEditMode) {
        divider.setBackground(ContextCompat.getDrawable(getActivity(), R.color.overlay_white_with_10));
    }

    subText = (TextView) view.findViewById(R.id.care_add_edit_sub_title);
    if (isEditMode) {
        subText.setTextColor(getResources().getColor(R.color.overlay_white_with_60));
    }
    return view;
}