Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.io.File;

import android.graphics.drawable.Drawable;
import android.os.Environment;

import android.widget.ImageView;

public class Main {
    public static final String CUST_PATH = Environment.getExternalStorageDirectory() + File.separator + "chcconf"
            + File.separator;
    public static final String LAUNCHER_LOGO_FILE_NAME = "logo_launcher.png";

    /**
     * launcher specific title
     * @param a
     * @param iv
     * @return
     */
    public static boolean checkAndSetLauncherTitle(ImageView iv) {
        if (iv == null)
            return false;
        Drawable d = Drawable.createFromPath(CUST_PATH + LAUNCHER_LOGO_FILE_NAME);
        if (d != null) {
            iv.setImageDrawable(d);
            return true;
        } else
            return false;
    }
}