Android Open Source - RecyclerViewLib Name Factory






From Project

Back to project page RecyclerViewLib.

License

The source code is released under:

Apache License

If you think the Android project RecyclerViewLib 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 com.twotoasters.recycled.factory;
/*from  w  w  w  .j  av a  2s  .com*/
import com.twotoasters.recycled.Item;

import java.util.ArrayList;
import java.util.Random;

public final class NameFactory {

    private final static String[] ANDROID_NAMES = new String[] { "Ben", "Chris", "Curtis", "Fred", "James", "Pat", "Marcelle" };
    private final static String[] TWO_TOASTERS_NAMES = new String[] { "Ben", "Chris", "Curtis", "Fred", "Sean"
            , "James", "Pat", "Rachit", "Adit", "Matt", "Josh", "Kayla", "Simon", "Joe", "Harold", "Danie"
            , "Dustin", "Darwin", "Karl", "Jason", "Kevin", "Prachi", "Duncan", "Tom", "Steve", "Ameir", "Jill"};

    private NameFactory() { }

    public static ArrayList<Item> getListOfNames() {
        ArrayList<Item> list = new ArrayList<Item>();
        for (String name : ANDROID_NAMES) {
            list.add(new Item(name));
        }
        return list;
    }

    public static Item getRandomName() {
        String name = TWO_TOASTERS_NAMES[new Random().nextInt(TWO_TOASTERS_NAMES.length)];
        return new Item(name);
    }
}




Java Source Code List

com.twotoasters.android.support.v7.widget.CardViewDelegate.java
com.twotoasters.android.support.v7.widget.CardViewEclairMr1.java
com.twotoasters.android.support.v7.widget.CardViewImpl.java
com.twotoasters.android.support.v7.widget.CardViewJellybeanMr1.java
com.twotoasters.android.support.v7.widget.CardView.java
com.twotoasters.android.support.v7.widget.DefaultItemAnimator.java
com.twotoasters.android.support.v7.widget.LinearLayoutManager.java
com.twotoasters.android.support.v7.widget.LinearSmoothScroller.java
com.twotoasters.android.support.v7.widget.PositionMap.java
com.twotoasters.android.support.v7.widget.RecyclerView.java
com.twotoasters.android.support.v7.widget.RoundRectDrawableWithShadow.java
com.twotoasters.anim.FlipDownItemAnimator.java
com.twotoasters.anim.FromTopItemAnimator.java
com.twotoasters.anim.GarageDoorItemAnimator.java
com.twotoasters.anim.PendingItemAnimator.java
com.twotoasters.anim.SlideItemAnimator.java
com.twotoasters.layoutmanager.BaseLayoutManager.java
com.twotoasters.layoutmanager.GridLayoutManager.java
com.twotoasters.recycled.ApplicationTest.java
com.twotoasters.recycled.Item.java
com.twotoasters.recycled.NameAdapter.java
com.twotoasters.recycled.NameViewHolder.java
com.twotoasters.recycled.RecycleActivity.java
com.twotoasters.recycled.factory.ItemAnimationFactory.java
com.twotoasters.recycled.factory.NameFactory.java
com.twotoasters.utils.DisplayUtils.java