/**
  * Creates a layout depending on the current sdk version
  *
  *
  * @param context Application context
  * @param appWidgetId Id of the widget
  * @param options Widgets options
  * @return RemoteViews for the layout
  */
 internal static RemoteViews CreateLayout(Context context, int appWidgetId)
 {
     // Only in api >= 11 (Honeycomb) can we support the large layout because we depend on
     // the remote view service.
     return(((int)Build.VERSION.SdkInt >= 11) ?  RemoteViewsFactory.CreateLargeLayout(context, appWidgetId) :
            RemoteViewsFactory.CreateSmallLayout(context, appWidgetId));
 }
        /**
         * Creates a layout depending on the app widgets options
         *
         * @param context Application context
         * @param appWidgetId Id of the widget
         * @param options Widgets options
         * @return RemoteViews for the layout
         */
        internal static RemoteViews CreateLayout(Context context, int appWidgetId, Bundle options)
        {
            bool isLargeLayout = options.GetInt(AppWidgetManager.OptionAppwidgetMinHeight) >= 100;

            return(isLargeLayout ? RemoteViewsFactory.CreateLargeLayout(context, appWidgetId) :
                   RemoteViewsFactory.CreateSmallLayout(context, appWidgetId));
        }