Code example for AbsListView.LayoutParams

0
 
        final Drawable divider = getDivider();
        if (mShowTopDivider && divider != null) {
            final int dividerHeight = getDividerHeight();
            final View view = new View(getContext());
            view.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, dividerHeight));
            addHeaderView(view);
        } 
    } 
 
    @Override 
    public void onDetachedFromWindow() { 
        super.onDetachedFromWindow(); 
 
        mUrlOpenListener = null;
    } 
 
    @Override 
    public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
        Object item = parent.getItemAtPosition(position);