TickerView.java revision 44c0dfd52fcee80adbf1b5fd034a03350dac0d46
1c4f4d5d570f294d011e276dc18d6d840e847958aEric Christopher/*
2c4f4d5d570f294d011e276dc18d6d840e847958aEric Christopher * Copyright (C) 2008 The Android Open Source Project
3c4f4d5d570f294d011e276dc18d6d840e847958aEric Christopher *
4c4f4d5d570f294d011e276dc18d6d840e847958aEric Christopher * Licensed under the Apache License, Version 2.0 (the "License");
5c4f4d5d570f294d011e276dc18d6d840e847958aEric Christopher * you may not use this file except in compliance with the License.
6c4f4d5d570f294d011e276dc18d6d840e847958aEric Christopher * You may obtain a copy of the License at
7c4f4d5d570f294d011e276dc18d6d840e847958aEric Christopher *
8c4f4d5d570f294d011e276dc18d6d840e847958aEric Christopher *      http://www.apache.org/licenses/LICENSE-2.0
9c4f4d5d570f294d011e276dc18d6d840e847958aEric Christopher *
10c4f4d5d570f294d011e276dc18d6d840e847958aEric Christopher * Unless required by applicable law or agreed to in writing, software
11c4f4d5d570f294d011e276dc18d6d840e847958aEric Christopher * distributed under the License is distributed on an "AS IS" BASIS,
12c4f4d5d570f294d011e276dc18d6d840e847958aEric Christopher * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13c4f4d5d570f294d011e276dc18d6d840e847958aEric Christopher * See the License for the specific language governing permissions and
14c4f4d5d570f294d011e276dc18d6d840e847958aEric Christopher * limitations under the License.
15c4f4d5d570f294d011e276dc18d6d840e847958aEric Christopher */
16c4f4d5d570f294d011e276dc18d6d840e847958aEric Christopher
17c4f4d5d570f294d011e276dc18d6d840e847958aEric Christopherpackage com.android.systemui.statusbar.phone;
18
19import android.content.Context;
20import android.util.AttributeSet;
21import android.widget.TextSwitcher;
22
23
24public class TickerView extends TextSwitcher
25{
26    Ticker mTicker;
27
28    public TickerView(Context context, AttributeSet attrs) {
29        super(context, attrs);
30    }
31
32    @Override
33    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
34        super.onSizeChanged(w, h, oldw, oldh);
35        if (mTicker != null) mTicker.reflowText();
36    }
37
38    public void setTicker(Ticker t) {
39        mTicker = t;
40    }
41}
42
43