Space.java revision 3f8956d82bb40b15acee26017db0d13ddf43c80a
13f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne/* 23f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * Copyright (C) 2011 The Android Open Source Project 33f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * 43f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * Licensed under the Apache License, Version 2.0 (the "License"); 53f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * you may not use this file except in compliance with the License. 63f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * You may obtain a copy of the License at 73f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * 83f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * http://www.apache.org/licenses/LICENSE-2.0 93f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * 103f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * Unless required by applicable law or agreed to in writing, software 113f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * distributed under the License is distributed on an "AS IS" BASIS, 123f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 133f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * See the License for the specific language governing permissions and 143f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * limitations under the License. 153f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne */ 163f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne 173f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milnepackage android.widget; 183f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne 193f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milneimport android.content.Context; 203f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milneimport android.graphics.Canvas; 213f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milneimport android.util.AttributeSet; 223f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milneimport android.view.View; 233f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milneimport android.view.ViewGroup; 243f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne 253f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne/** 263f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * Space is a lightweight View subclass that may be used to create gaps between components 273f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * in general purpose layouts. 283f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne */ 293f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milnepublic final class Space extends View { 303f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne /** 313f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * {@inheritDoc} 323f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne */ 333f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne public Space(Context context, AttributeSet attrs, int defStyle) { 343f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne super(context, attrs, defStyle); 353f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne } 363f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne 373f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne /** 383f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * {@inheritDoc} 393f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne */ 403f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne public Space(Context context, AttributeSet attrs) { 413f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne super(context, attrs); 423f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne } 433f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne 443f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne /** 453f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * {@inheritDoc} 463f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne */ 473f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne public Space(Context context) { 483f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne super(context); 493f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne } 503f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne 513f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne /** 523f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * Draw nothing. 533f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * 543f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * @param canvas an unused parameter. 553f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne */ 563f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne @Override 573f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne public void draw(Canvas canvas) { 583f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne } 593f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne 603f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne /** 613f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * {@inheritDoc} 623f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne */ 633f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne @Override 643f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne public ViewGroup.LayoutParams getLayoutParams() { 653f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne return super.getLayoutParams(); 663f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne } 673f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne 683f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne /** 693f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne * {@inheritDoc} 703f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne */ 713f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne @Override 723f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne public void setLayoutParams(ViewGroup.LayoutParams params) { 733f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne super.setLayoutParams(params); 743f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne } 753f8956d82bb40b15acee26017db0d13ddf43c80aPhilip Milne} 76