MAFImageView

MAFImageView control extends the capabilities of the android.widget. ImageView native button.

To create and present a default SAP style instance of MAFImageView, use:
File externalFilesDir = getExternalFilesDir(null);
File dir = (externalFilesDir!=null) ? externalFilesDir : getFilesDir();
try {
          MAFImageView iv = MAFUIFactory.getInstance().getImageView(this, "test", 
dir);                
                root_layout.addView(iv);
} catch (IllegalArgumentException iae) {                
                MAFLogger.e(LOG_TAG, iae.getMessage());   
} 

The MAF skinning engine lets you define the source of an image view runtime. Define the URL from where the component downloads the image. This lets you change images at runtime, without editing the code. The component stores the image in the directory defined in the constructor call by the application developer.

This is the XAML content for the default style of the Image TargetType:
<Style TargetType="Image" id="test" width="200" height="200" platform="android">
                 <URL url="http://cdn.gottabemobile.com/wp-
content/uploads/android.jpg" proxyhost="10.55.188.10"
                        proxyport="8080" />           
</ Style > 

In the image style definition, add a URL element that defines the source of the image. You can also add a proxy host and port that is used for proxy settings during download. Add INTERNET_PERMISSION to the manifest file, as pictures are downloaded via the network.

You can also initialize a MAFImageView using a bitmap with this constructor:
public MAFImageView(Context context, Bitmap bitmap) 
You can change these properties in the skinning XML:
id The ID that you refer to when you create the image view
width / height Image size
<URL></URL> URL element that defines the source of the image
proxyhost / proxyport Proxy definition