Android SDK Version
  • java.lang.Object
    • com.facebook.ads.NativeAdBase.Image
Enclosing class:

public static class NativeAdBase.Image
extends java.lang.Object
Image creative.
Since:
4.6
Method Summary
Modifier and TypeMethod and Description
static NativeAdBase.ImagefromJSONObject(JSONObject dataObject)
Parses an Image from the given JSON object.
intgetHeight()
Gets the height of the image.
intgetWidth()
Gets the width of the image.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Method Detail

getWidth

public int getWidth()
Gets the width of the image.
Returns:
width of the image in dp

getHeight

public int getHeight()
Gets the height of the image.
Returns:
height of the image in dp

fromJSONObject

public static NativeAdBase.Image fromJSONObject(JSONObject dataObject)
Parses an Image from the given JSON object.
Parameters:
dataObject - the json object
Returns:
parsed Image or null if failed