Fields | ||
---|---|---|
protected final Context | mContext | |
protected final BitmapFactory.Options | mBitmapOptions | |
protected final int | mInnerWidth | |
protected final int | mInnerHeight |
Public Constructors | |
---|---|
SmartEyeglassWidgetImage(Context context)
Initializes the SmartEyeglass widget image with a frame size suitable for the SmartEyeglass display. |
Public Methods | |
---|---|
static int |
getSupportedWidgetHeight(Context context)
Retrieves the widget frame height for the SmartEyeglass. |
static int |
getSupportedWidgetWidth(Context context)
Retrieves the widget frame width for the SmartEyeglass. |
SmartEyeglassWidgetImage |
setText(java.lang.String text)
Sets a custom text. |
SmartEyeglassWidgetImage |
setIconByResourceId(int iconId)
Sets the widget icon using a resource ID. |
SmartEyeglassWidgetImage |
setIconByUri(java.lang.String iconUri)
Sets the widget icon using a URI. |
SmartEyeglassWidgetImage |
setInnerLayoutResourceId(int layoutId)
Creates an instance of this class that displays a custom layout inside the widget frame. |
Bitmap |
getBitmap()
Retrieves the bitmap for this widget. |
Protected Methods | |
---|---|
void |
applyInnerLayout(LinearLayout innerLayout)
Retrieves the bitmap inside the widget frame. |
Initializes the SmartEyeglass widget image with a frame size suitable for the SmartEyeglass display.
context | The context. |
---|
Retrieves the widget frame height for the SmartEyeglass.
context | The context. |
---|
The height in pixels.
Retrieves the widget frame width for the SmartEyeglass.
context | The context. |
---|
The width in pixels.
Sets a custom text. Typically used for a card that shows only text, where no specific layout is needed.
text | The display text. |
---|
this.
Sets the widget icon using a resource ID.
iconId | The resource ID of the icon to display. |
---|
this.
Sets the widget icon using a URI.
iconUri | The URI of the icon. |
---|
this.
Creates an instance of this class that displays a custom layout inside the widget frame.
layoutId | The resource ID of the layout. |
---|
this.
Retrieves the bitmap for this widget.
The bitmap object.
Retrieves the bitmap inside the widget frame. Example: ((TextView)innerLayout.findViewById(R.id.my_custom_widget_city)).setText("Paris");
innerLayout |
---|
Defines a widget bitmap that conforms to SmartEyeglass standards for the top-level menu. Use to define a "card", the screen in the top menu that starts your app.