Skip to Content
0
May 21 at 10:42 AM

Extension MDK

88 Views Last edit May 24 at 03:09 AM 4 rev

Hi All,

I have referred Map and Slider Extension blogs to create an extension in my MDK App. My requirement is to just display an image using extension.

==> The method that I have created to set image is :

public setImageURI(uri: string): void {

this._somevariable= uri;

this._imageView.setImageURI(this._somevariable);

}

==>Layout Params for image view :

this._imageView = new android.widget.ImageView(this._androidcontext);

const labelBottomPaddingInPx = layout.round(layout.toDevicePixels(8));

this._imageView.setPadding(0, 0, 0, labelBottomPaddingInPx);

this._imageView.setLayoutParams(new android.view.ViewGroup.LayoutParams(-3, -4));

==>Have called this method :

this.valueResolver().resolveValue(extProps.Uri, this.context, true).then(function (uri) {

this._slider.setImageURI(uri);

}.bind(this));

==>And the image path is binded on page under extension properties.

Can anyone help me out with whats going wrong?

Thanks,

Aarti Singh.