add ListView Header View - Android User Interface

Android examples for User Interface:ListView

Description

add ListView Header View

Demo Code


//package com.java2s;

import android.view.View;
import android.widget.ListView;

public class Main {
    public static void addHeaderView(ListView listView, View view) {
        if (listView == null || listView.getHeaderViewsCount() != 0
                || view == null) {//from   w  w  w. java  2 s. c  o  m
            return;
        }
        listView.addHeaderView(view, null, false);
    }
}

Related Tutorials