Android Open Source - SampleAndroidL Code Utils






From Project

Back to project page SampleAndroidL.

License

The source code is released under:

GNU General Public License

If you think the Android project SampleAndroidL listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.fingerlinks.mobile.android.samplel;
/*  w  w  w . j av a 2  s  .  co m*/
import android.content.Context;

/**
 * Created by Fabio Ranieri on 20/10/14.
 * Copyright 2014 Fingerlinks s.r.l.
 */
public class CodeUtils {

    /**
     * @param context
     * @param name
     * @return
     */
    public static int getImageResourceId(Context context, String name) {
        try {
            return context.getResources().
                    getIdentifier(name, "drawable", context.getPackageName());
        } catch (Exception e) {
            e.printStackTrace();
            return -1;
        }
    }
}




Java Source Code List

org.fingerlinks.mobile.android.samplel.ApplicationTest.java
org.fingerlinks.mobile.android.samplel.CodeUtils.java
org.fingerlinks.mobile.android.samplel.DetailActivity.java
org.fingerlinks.mobile.android.samplel.MainActivity.java
org.fingerlinks.mobile.android.samplel.TestJobServiceActivity.java
org.fingerlinks.mobile.android.samplel.adapter.ImageAdapter.java
org.fingerlinks.mobile.android.samplel.listener.RecyclerItemClickListener.java
org.fingerlinks.mobile.android.samplel.model.ImageFactoryManager.java
org.fingerlinks.mobile.android.samplel.model.Image.java
org.fingerlinks.mobile.android.samplel.service.TestJobService.java