MAFImageView control extends the capabilities of the android.widget. ImageView native button.
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.
<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.
public MAFImageView(Context context, Bitmap bitmap)
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 |