Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all,
Vanilla are planning an update to the site on April 24th (next Wednesday). It is a major PHP8 update which is expected to boost performance across the site. The site will be down from 7pm and it is expected to take about an hour to complete. We appreciate your patience during the update.
Thanks all.

Android Widget Drawer Graphic

  • 10-12-2013 11:17am
    #1
    Closed Accounts Posts: 19,777 ✭✭✭✭


    With some devices, many Samsung phones anyway, you'll be given two tabs for your app drawers; one for apps and one for widgets. The latter will often display small thumbnail example screenshots of the widgets that you can then drop onto your homescreen. If a custom screenshot hasn't been configured, you'll still see a thumbnail, but only with the widget ic_launcher embedded.

    Question is, how are these thumbnail screenshots embedded? I've searched high and low for an answer, including the Samsung developer docs, as it may simply be a Samsung-only feature, but have been unable to find any documentation on this.

    It's not a 'must have' feature, but my guess is that it's probably quite an easy one to implement, so it would be nice to do so. Anyone come across documentation on this?


Comments

  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Bump. Is no one even going to take a stab at this?


  • Registered Users Posts: 7,859 ✭✭✭The_B_Man




  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Thanks. Easy to Google it when you know what on Earth they call it ;)

    Very easy to implement (preview image can either be created using an app that is installed on the emulator, otherwise there's this app which will allow you to do so on a phone).

    However... this feature appears not to be backwardly compatible, so the new previewImage attribute will end up breaking your widget-provider XML if you've a minSdkVersion below 11 (3.0 Honeycomb). As an API level of 10 (2.3 Gingerbread) alone still accounts for about 25% of the Android user base, it really doesn't make sense to exclude them just for the sake of a pretty preview thumbnail. Fortunately the solution for this is the use of multiple widget-provider files in version specific folders (e.g. xml-v11 and xml-v10). Hope that additional bit of info is of use to others in the future.


  • Registered Users Posts: 7,859 ✭✭✭The_B_Man


    Is the Widget tab actually in the gingerbread launchers?

    I thought with the older launchers, it was just the apps in the drawer, and widgets were only added via a long-click.

    I can't say I've tested any newer launchers on Gingerbread though.


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    The_B_Man wrote: »
    Is the Widget tab actually in the gingerbread launchers?
    No. Widget previews were apparently introduced with Honeycomb (3.0). If you want to both include a preview and maintain support for Gingerbread (2.3.x), you'll need to include multiple widget-provider files, one with a android:previewImage attribute for API 11+ and one without for API 10-.


  • Advertisement
Advertisement