Java tutorial
//package com.java2s; /* * Copyright (C) 2013 AOKP by Steve Spear - Stevespear426 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import java.util.ArrayList; public class Main { public final static int ANIMATION_DEFAULT = 0; public final static int ANIMATION_FADE = 1; public final static int ANIMATION_SLIDE_RIGHT = 2; public final static int ANIMATION_SLIDE_LEFT = 3; public final static int ANIMATION_SLIDE_RIGHT_NO_FADE = 4; public final static int ANIMATION_SLIDE_LEFT_NO_FADE = 5; public final static int ANIMATION_SLIDE_UP = 6; public final static int ANIMATION_SLIDE_DOWN = 7; public final static int ANIMATION_TRANSLUCENT = 8; public final static int ANIMATION_GROW_SHRINK = 9; public final static int ANIMATION_GROW_SHRINK_CENTER = 10; public final static int ANIMATION_GROW_SHRINK_BOTTOM = 11; public final static int ANIMATION_GROW_SHRINK_LEFT = 12; public final static int ANIMATION_GROW_SHRINK_RIGHT = 13; public static int[] getAnimationsList() { ArrayList<Integer> animList = new ArrayList<Integer>(); animList.add(ANIMATION_DEFAULT); animList.add(ANIMATION_FADE); animList.add(ANIMATION_SLIDE_RIGHT); animList.add(ANIMATION_SLIDE_LEFT); animList.add(ANIMATION_SLIDE_RIGHT_NO_FADE); animList.add(ANIMATION_SLIDE_LEFT_NO_FADE); animList.add(ANIMATION_SLIDE_UP); animList.add(ANIMATION_SLIDE_DOWN); animList.add(ANIMATION_TRANSLUCENT); animList.add(ANIMATION_GROW_SHRINK); animList.add(ANIMATION_GROW_SHRINK_CENTER); animList.add(ANIMATION_GROW_SHRINK_BOTTOM); animList.add(ANIMATION_GROW_SHRINK_LEFT); animList.add(ANIMATION_GROW_SHRINK_RIGHT); int length = animList.size(); int[] anim = new int[length]; for (int i = 0; i < length; i++) { anim[i] = animList.get(i); } return anim; } }