Code Monkey home page Code Monkey logo

device-frame-generator's Introduction

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.

Build Status

Android Arsenal

device-frame-generator's People

Contributors

f2prateek avatar ingbrzy avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.