use of com.github.ignition.core.adapters.RemoteImageGalleryAdapter in project ignition by mttkay.
the class RemoteImageGalleryActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.remote_image_gallery_sample);
RemoteImageView.setSharedImageLoader(new RemoteImageLoader(this));
Gallery gallery = (Gallery) findViewById(R.id.gallery);
gallery.setAdapter(new RemoteImageGalleryAdapter(this, Arrays.asList(imageUrls)) {
@Override
protected void onGetView(int position, RemoteImageView remoteImageView, ViewGroup remoteImageViewContainer, ViewGroup parent) {
// just to illustrate how you can adjust aspects of the rendered images here
remoteImageView.setScaleType(ScaleType.CENTER_CROP);
remoteImageViewContainer.setBackgroundResource(android.R.drawable.gallery_thumb);
int padding = IgnitedScreens.dipToPx(parent.getContext(), 15);
remoteImageViewContainer.setPadding(padding, padding, padding, padding);
}
});
}
Aggregations