VerticalGridView.java revision 9106804a84e5e8733e0b9313f749fa1f726e5d11
19106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn/*
29106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn * Copyright (C) 2014 The Android Open Source Project
39106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn *
49106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
59106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn * in compliance with the License. You may obtain a copy of the License at
69106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn *
79106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn * http://www.apache.org/licenses/LICENSE-2.0
89106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn *
99106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn * Unless required by applicable law or agreed to in writing, software distributed under the License
109106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
119106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn * or implied. See the License for the specific language governing permissions and limitations under
129106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn * the License.
139106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn */
149106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbournpackage android.support.v17.leanback.widget;
159106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn
169106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbournimport android.content.Context;
179106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbournimport android.support.v7.widget.RecyclerView;
189106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbournimport android.util.AttributeSet;
199106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn
209106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn/**
219106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn * A view that shows items in a vertically scrolling list. The items come from
229106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn * the {@link RecyclerView.Adapter} associated with this view.
239106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn */
249106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbournpublic class ListView extends BaseListView {
259106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn
269106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn    public ListView(Context context) {
279106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn        this(context, null);
289106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn    }
299106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn
309106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn    public ListView(Context context, AttributeSet attrs) {
319106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn        this(context, attrs, 0);
329106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn    }
339106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn
349106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn    public ListView(Context context, AttributeSet attrs, int defStyle) {
359106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn        super(context, attrs, defStyle);
369106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn        mLayoutManager.setOrientation(RecyclerView.VERTICAL);
379106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn        initBaseListViewAttributes(context, attrs);
389106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn    }
399106804a84e5e8733e0b9313f749fa1f726e5d11Tim Kilbourn}
40