Android Open Source - android-static-live-wallpaper Linear Layout

From Project

Back to project page android-static-live-wallpaper.


The source code is released under:

GNU General Public License

If you think the Android project android-static-live-wallpaper listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

//  ww w .  j av  a 2
import java.util.Observable;

import android.content.Context;
import android.util.AttributeSet;

public class LinearLayout extends android.widget.LinearLayout {
  public LinearLayout(Context context) {

  public LinearLayout(Context context, AttributeSet attrs) {
    super(context, attrs);

  private class MyObservable extends Observable {
    public void set() {

  private MyObservable observable = new MyObservable();

  public Observable getSizeObserver() {
    return observable;

  protected void onSizeChanged(int w, int h, int oldw, int oldh) {
    super.onSizeChanged(w, h, oldw, oldh);

    observable.notifyObservers(new Point(w, h));

Java Source Code List