title: Adding Custom ViewFlipper in Widget does not work to show?
body: <p>As per <a href="https://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout" rel="nofollow">android.developer</a> site <code>ViewFlipper</code> support as <code>RemoreViews</code> So i decide to make one simple Widget which show fix images and i want user to make then start and stop by providing <code>Button</code>.</p>
  
  <p>Now my problem is <code>ViewFlipper</code> does not have <code>startFlipping()</code> and <code>stopFlipping()</code> method as RemoteMethod, So decide to use my own Custom <code>ViewFlipper</code> to call <code>startFlipping()</code> and <code>stopFlipping()</code> by my self from <code>setFlipInterval</code> because it is RemoteMethod.</p>
  
  <p>Here is my Custom <code>ViewFlipper</code> Class .</p>
  
  <pre><code>@RemoteView
  public class PhotoViewFliper extends ViewFlipper {
  
      public static final int STOP_FLIP = -11;
  
      public static final int START_FLIP = -12;
  
      public String TAG = PhotoViewFliper.class.getCanonicalName();
  
      public PhotoViewFliper(Context _Context) {
          // TODO Auto-generated constructor stub
          super(_Context);
      }
  
      public PhotoViewFliper(Context context, AttributeSet attrs) {
          super(context, attrs);
          // TODO Auto-generated constructor stub
      }
  
      @Override
      public void stopFlipping() {
  
          super.stopFlipping();
          Log.d(TAG, "stopFlipping--My Called ");
      }
  
      @Override
      public void setVisibility(int visibility) {
          // TODO Auto-generated method stub
          super.setVisibility(visibility);
      }
  
      @Override
      public void setFlipInterval(int milliseconds) {
  
          Log.d(TAG, "setFlipInterval--My Called " + milliseconds);
          switch (milliseconds) {
  
          case STOP_FLIP:
              stopFlipping();
              Log.d(TAG, "In Side Switch stopFlipping--My Called ");
              break;
          case START_FLIP:
              startFlipping();
  
              Log.d(TAG, "In Side Switch startFlipping--My Called ");
  
              break;
          default:
              super.setFlipInterval(milliseconds);
          }
      }
  }
  </code></pre>
  
  <p>and below is my layout use in <code>Widget</code></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="250dp"
      android:layout_height="250dp"
      android:layout_margin="10dp" &gt;
  
      &lt;com.photos.widget.PhotoViewFliper
          android:id="@+id/vflipper"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:autoStart="true"
          android:background="@drawable/bg_white_boarder"
          android:flipInterval="3000"
          android:inAnimation="@anim/in_from_right"
          android:outAnimation="@anim/out_to_left" &gt;
  
          &lt;ImageView
              android:layout_width="200dp"
              android:layout_height="200dp"
              android:src="@drawable/widget_examples" /&gt;
  
          &lt;ImageView
              android:layout_width="200dp"
              android:layout_height="200dp"
              android:src="@drawable/tad_logo_com" /&gt;
      &lt;/com.photos.widget.PhotoViewFliper&gt;
  
      &lt;ImageView
          android:id="@+id/btn_play_pause"
          android:layout_width="35dp"
          android:layout_height="35dp"
          android:layout_gravity="bottom|center_horizontal"
          android:src="@drawable/ic_av_pause_over_video" /&gt;
  
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>Below  is my Error Logtag</p>
  
  <pre><code>03-13 01:56:48.555: W/AppWidgetHostView(1420): updateAppWidget couldn't find any view, using error view
  03-13 01:56:48.555: W/AppWidgetHostView(1420): android.view.InflateException: Binary XML file line #7: Error inflating class com.photos.widget.PhotoViewFliper
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:707)
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at android.widget.RemoteViews.apply(RemoteViews.java:2415)
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at android.appwidget.AppWidgetHostView.updateAppWidget(AppWidgetHostView.java:402)
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at com.android.launcher2.LauncherAppWidgetHostView.updateAppWidget(LauncherAppWidgetHostView.java:54)
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at android.appwidget.AppWidgetHost.updateAppWidgetView(AppWidgetHost.java:408)
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at android.appwidget.AppWidgetHost$UpdateHandler.handleMessage(AppWidgetHost.java:104)
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at android.os.Handler.dispatchMessage(Handler.java:102)
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at android.os.Looper.loop(Looper.java:136)
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at android.app.ActivityThread.main(ActivityThread.java:5017)
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at java.lang.reflect.Method.invokeNative(Native Method)
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at java.lang.reflect.Method.invoke(Method.java:515)
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at dalvik.system.NativeStart.main(Native Method)
  03-13 01:56:48.555: W/AppWidgetHostView(1420): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.photos.widget.PhotoViewFliper" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/system/lib]]
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at android.view.LayoutInflater.createView(LayoutInflater.java:559)
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
  03-13 01:56:48.555: W/AppWidgetHostView(1420):  ... 16 more
  </code></pre>