Home | History | Annotate | Download | only in DemoKit
      1 package com.google.android.DemoKit;
      2 
      3 import android.content.res.Resources;
      4 import android.view.View;
      5 
      6 public abstract class AccessoryController {
      7 
      8 	protected DemoKitActivity mHostActivity;
      9 
     10 	public AccessoryController(DemoKitActivity activity) {
     11 		mHostActivity = activity;
     12 	}
     13 
     14 	protected View findViewById(int id) {
     15 		return mHostActivity.findViewById(id);
     16 	}
     17 
     18 	protected Resources getResources() {
     19 		return mHostActivity.getResources();
     20 	}
     21 
     22 	void accessoryAttached() {
     23 		onAccesssoryAttached();
     24 	}
     25 
     26 	abstract protected void onAccesssoryAttached();
     27 
     28 }