title: Setting button for Live Wallpaper doesn't appear
body: <p>I created a preference files for my slide show Live Wallpaper.<br>
  Most of the source are copied from several samples. I think I copied them correctly, and the eclipse shows no warnings or errors for my source.<br>
  My problem is that the &quot;Settings&quot; button doesn't appear when I choose the Live Wallpaper.</p>
  <p>I checked the very close question <a href="https://stackoverflow.com/questions/5188742/cant-get-settings-button-to-display-for-live-wallpaper">&quot;Can't get settings button to display for live wallpaper&quot;</a>, but it didn't solve my problem.</p>
  <p>I suspect something is wrong with my Manifest, or preference sources, but I couldn't find the point.</p>
  <p>Sorry for my bad English.</p>
  <p>My sources are follows:</p>
  <p><strong>AndroidManifest.xml</strong></p>
  <pre><code> &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;manifest package=&quot;sample.slide_wallpaper&quot;
      android:versionCode=&quot;1&quot;
      android:versionName=&quot;1.0&quot;
      xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&gt;
  
      &lt;uses-sdk android:minSdkVersion=&quot;7&quot; android:targetSdkVersion=&quot;8&quot; /&gt;
      &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot;/&gt;
      &lt;application
          android:icon=&quot;@drawable/icon&quot;
          android:label=&quot;@string/app_name&quot;&gt;
  
          &lt;!-- =========================================================== --&gt;
          &lt;!-- Launcher --&gt;
          &lt;activity android:name=&quot;.Launcher&quot; android:label=&quot;@string/app_name&quot;
              android:theme=&quot;@style/Theme.HalfTrans&quot;&gt;
             &lt;intent-filter&gt;
                 &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
                 &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
             &lt;/intent-filter&gt;
          &lt;/activity&gt;
  
          &lt;!-- ==============================================================--&gt;
          &lt;!-- Live Wallpaper --&gt;
          &lt;service
              android:enabled=&quot;true&quot;
              android:permission=&quot;android.permission.BIND_WALLPAPER&quot;
              android:label=&quot;@string/app_name&quot;
              android:name=&quot;SlideWallpaper&quot;
              android:icon=&quot;@drawable/thumbnail&quot;&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name=&quot;android.service.wallpaper.WallpaperService&quot;&gt;&lt;/action&gt;
              &lt;/intent-filter&gt;
              &lt;meta-data
                  android:name=&quot;android.service.wallpaper&quot;
                  android:resource=&quot;@xml/wallpaper&quot;&gt;
              &lt;/meta-data&gt;
          &lt;/service&gt;
  
          &lt;!-- ================================================================= --&gt;
          &lt;!-- Preferences --&gt;
          &lt;activity
              android:name=&quot;sample.slide_wallpaper.Prefs&quot;
              android:label=&quot;@string/wallpaper_settings&quot;
              android:theme=&quot;@android:style/Theme.WallpaperSettings&quot;
              android:exported=&quot;true&quot;&gt;
              &lt;intent-filter&gt;
                  &lt;category android:name=&quot;android.intent.category.PREFERENCE&quot; /&gt;
               &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  <p><strong>settings.xml</strong></p>
  <pre><code>    &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
      &lt;PreferenceScreen
              xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
              android:title=&quot;@string/wallpaper_settings&quot;
              &gt;
           &lt;ListPreference
                android:key=&quot;timer_key&quot;
                android:title=&quot;@string/list_title&quot;
                android:summary=&quot;@string/list_summary&quot;
                android:entries=&quot;@array/timer_pref&quot;
                android:entryValues=&quot;@array/timer_pref_values&quot;
                android:defaultValue=&quot;5000&quot;
                /&gt;
      &lt;/PreferenceScreen&gt;
  
  **wallpaper.xml**
  
      &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
      &lt;wallpaper xmlns:android=&quot;http://shemas.android.com/apk/res/android&quot;
          android:thumbnail=&quot;@drawable/thumbnail&quot;
          android:description=&quot;@string/description&quot;
          android:settingsActivity=&quot;sample.slidewallpaper.Prefs&quot;
          /&gt;
  
  **Prefs.java**
  
      package sample.slide_wallpaper;
  
      import sample.slide_wallpaper.R;
      import android.content.SharedPreferences;
      import android.os.Bundle;
      import android.preference.PreferenceActivity;
      import android.util.Log;
      
      public class Prefs extends PreferenceActivity 
      implements  SharedPreferences.OnSharedPreferenceChangeListener {
      
      @Override
      protected void onCreate(Bundle icicle) {
          super.onCreate(icicle);
          Log.w(&quot;Prefs&quot;, &quot;prefs onCreate&quot;);
          addPreferencesFromResource(R.xml.settings);
      }
  
      @Override
      protected void onDestroy()
      {           
          getPreferenceManager().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this);
          super.onDestroy();
      }
  
          public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key)
          {
          }
      }
  </code></pre>
  <p><strong>SlideWallpaper.java</strong></p>
  <pre><code>package sample.slide_wallpaper;
  import java.util.Random;
  import android.graphics.Bitmap;
  import android.graphics.BitmapFactory;
  import android.graphics.Canvas;
  import android.graphics.Color;
  import android.graphics.Paint;
  import android.os.Handler;
  import android.service.wallpaper.WallpaperService;
  import android.util.Log;
  import android.view.Display;
  import android.view.SurfaceHolder;
  import android.view.WindowManager;
  import android.content.SharedPreferences;
  import android.content.res.Resources;
  
  //WallpaperService
  public class SlideWallpaper extends WallpaperService {
          // Path for Prefs
          public static final String SHARED_PREFS_NAME = &quot;sample.slide_wallpaper.Prefs&quot;;
  
      @Override
      public void onCreate() {
          .....
          super.onCreate();
  
      }
  
      @Override
      public void onDestroy() {
          super.onDestroy();
      }
  
      @Override
      public WallpaperService.Engine onCreateEngine() {
          return new WallpaperEngine(getResources());
      }
  
      //*********************************************************
      //Wallpaper Engine
      //*********************************************************
      public class WallpaperEngine extends Engine 
      implements SharedPreferences.OnSharedPreferenceChangeListener {
          private final Handler handler=new Handler();
  
          SharedPreferences prefs;
  
          public Bitmap img;
          private Bitmap images[] = new Bitmap[5];
          private Bitmap eximg;
  
          private final Random randGen = new Random();
  
          private static final String TAG = &quot;WallpaperEngine&quot;;
  
          //timer
          private long timer = 5000;//interval(sec)×1000
          private long startTime = 0;
  
          private int currentAlpha;
          private final Paint imagePaint;
  
          private final Runnable drawThread=new Runnable() {
              public void run() {
                  Log.d(TAG,&quot;runnable&quot;);
                  drawFrame();
              }
          };
  
      public WallpaperEngine(Resources r) {
  
          prefs=SlideWallpaper.this.getSharedPreferences(SHARED_PREFS_NAME, 0);
          prefs.registerOnSharedPreferenceChangeListener(this);
  
          images[0]=BitmapFactory.decodeResource(r,R.drawable.imgA);
          images[1]=BitmapFactory.decodeResource(r,R.drawable.imgB);
          images[2]=BitmapFactory.decodeResource(r,R.drawable.imgC);
          images[3]=BitmapFactory.decodeResource(r,R.drawable.imgD);
          images[4]=BitmapFactory.decodeResource(r,R.drawable.imgE);
  
          eximg = BitmapFactory.decodeResource(r,R.drawable.bg1);
          img = eximg;
  
          imagePaint = new Paint();
          imagePaint.setAlpha(255);
          }
  
      //=============================
      public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key){
          Log.w(TAG, &quot;onPreferenceChanged&quot;);//this Log doesn't show up
          String listString = prefs.getString(&quot;timer_key&quot;, &quot;5000&quot;);
          int listInt = Integer.parseInt(listString);
          timer = listInt;
      }
      //=================================
      @Override
      public void onCreate(SurfaceHolder surfaceHolder) {
          super.onCreate(surfaceHolder);
          Log.d(TAG, &quot;onCreate&quot;);
          drawFrame();
      }
  
      //=====================================
      @Override
      public void onDestroy() {
          super.onDestroy();
          handler.removeCallbacks(fadeAnimate);
          handler.removeCallbacks(drawThread);
      }
  
      //==================================
      @Override
      public void onVisibilityChanged(boolean visible) {
          Log.d(TAG, &quot;Visibility changed&quot;);
          if (visible) {
              if(nowTime() - startTime + 100 &lt; timer){
                  if (img.isRecycled()) {
                      img = eximg;
                  }
                  drawBitmap(img);
                  handler.postDelayed(drawThread, timer - (nowTime() - startTime));
              }else {
                  drawFrame();
              }
          } else {
              handler.removeCallbacks(fadeAnimate);
              handler.removeCallbacks(drawThread);
          }
      }
  
      //===================================================
      //draws bitmap
      private void drawBitmap(Bitmap b) {
      ............
      }
  
          //=========================
          @Override
          public void onSurfaceCreated(SurfaceHolder holder) {
              super.onSurfaceCreated(holder);
          }
  
          //============================
          @Override
          public void onSurfaceChanged(SurfaceHolder holder,
              int format,int width,int height) {
              super.onSurfaceChanged(holder,format,width,height);
              drawFrame();
          }
  
          //==============================
          @Override
          public void onSurfaceDestroyed(SurfaceHolder holder) {
              super.onSurfaceDestroyed(holder);
              handler.removeCallbacks(fadeAnimate);
              handler.removeCallbacks(drawThread);
          }
  
          //=================================
          @Override
          public void onOffsetsChanged(float xOffset,float yOffset,
              float xStep,float yStep,int xPixels,int yPixels) {
              drawBitmap(img);
          }
  
      //=================================================
      //Changes image==================================
      protected void drawFrame() {
      .....
      }
  
      private final Runnable fadeAnimate = new Runnable() {
          public void run() {
            fadeTransition(img, currentAlpha);
          }
      };
  
      private void fadeTransition(Bitmap b, int alpha) {
          .....
      }//END fadeTransition
  
  
      private long nowTime() {
          return System.nanoTime() / 1000000;
      }
  
  
  }//Engine
  }//END
  </code></pre>
  <p>I really need your help!!</p>
  <p>Also, the thumbnail image doesn't show up on the Live Wallpaper list. But this is a small problem.</p>