Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import java.util.Map;
import java.util.Map.Entry;

import android.graphics.drawable.Drawable;

import android.widget.ImageView;

public class Main {
    /**
     * Set drawables for map of views.
     * @param views
     * @param drawables
     * @param convert
     */
    public static void setDrawables(Map<Integer, ImageView> views, Map<Integer, Drawable> drawables,
            Map<Integer, Integer> convert) {
        for (Entry<Integer, ImageView> entry : views.entrySet()) {
            Drawable drawable = drawables.get(convert.get(entry.getKey()));
            entry.getValue().setImageDrawable(drawable);
        }
    }
}