2 * Copyright (C) 2010 The Android Open Source Project
4 * Licensed under the Eclipse Public License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.eclipse.org/org/documents/epl-v10.php
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package com.android.adt.gscripts;
21 * An {@link IViewRule} for android.widget.ListView and all its derived classes.
22 * This is the "root" rule, that is used whenever there is not more specific rule to apply.
24 public class AndroidWidgetListViewRule extends BaseView {
26 // ==== XML Creation ====
29 * The default for new views is to be wrap_content on both width/height.
30 * However ListView is special in that ideally we want fill_parent width by default.
32 public Map<?, ?> getDefaultAttributes() {
33 // TODO: find a way to plug in the new value VALUE_MATCH_PARENT.
34 return [ ATTR_LAYOUT_WIDTH : VALUE_FILL_PARENT ];