Device Frame Generator

General

Category
Free
Tag
Tools
License
Apache License, Version 2.0
Registered
Feb 7, 2015
Favorites
1
Link
https://github.com/f2prateek/device-frame-generator
See also
Android Resizer
alfi
Frog
ProbeTools
Gradlr

Additional

Language
Java
Version
v2.0.1 (Jan 17, 2014)
Created
Oct 30, 2012
Updated
Nov 17, 2021 (Retired)
Owner
Prateek Srivastava (f2prateek)
Contributors
Prateek Srivastava (f2prateek)
ingbrzy
2
Activity
Badge
Generate
Download
Source code

Advertisement

Device Frame Generator

Wrap your app screenshots in real device artwork. For more information, see the website.

Adding Devices

To add new devices, you'll need to add 7 images in the app/src/main/res/drawable-nodpi:

  • device_land_back
  • device_land_glare
  • device_land_shadow
  • device_port_back
  • device_port_glare
  • device_port_shadow
  • device_thumb

All these should be in the png format and named as above - with device replaced with a key that will identify this set of frames. Once that's done, simply add the metadata in DeviceModule.java located at app/src/main/java/com/f2prateek/dfg/DeviceModule.java. Here's what an example for the Nexus 5 would look like.

@Provides(type = SET) Device provideNexus5() {
    return new Device.Builder().setId("nexus_5")
        .setName("Nexus 5")
        .setUrl("http://www.google.com/nexus/5/")
        .setPhysicalSize(5.43f)
        .setDensity("XXHDPI")
        .setLandOffset(436, 306)
        .setPortOffset(306, 436)
        .setPortSize(1080, 1920)
        .setRealSize(1080, 1920)
        .addProductId("hammerhead")
        .build();
  }

You can see what the metadata fields mean at Device.java

Building

Simply execute ./gradlew clean build.