Android LayoutAnimationController - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android LayoutAnimationController class.

This code example shows how to use the following methods:
  } 
 
  @Implementation 
  public static LayoutAnimationController loadLayoutAnimation(Context context, int id) { 
    Animation anim = new TranslateAnimation(0, 0, 30, 0); 
    LayoutAnimationController layoutAnim = new LayoutAnimationController(anim); 
    Robolectric.shadowOf(layoutAnim).setLoadedFromResourceId(id); 
    return layoutAnim; 
  } 
 
} 
8
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	} 
	 
	@Implementation 
	public static LayoutAnimationController loadLayoutAnimation(Context context, int id) { 
		Animation anim = new TranslateAnimation(0, 0, 30, 0); 
		LayoutAnimationController layoutAnim = new LayoutAnimationController(anim); 
		Robolectric.shadowOf(layoutAnim).setLoadedFromResourceId(id); 
		return layoutAnim;  
	} 
	 
} 
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
            Animation.RELATIVE_TO_SELF, -1.0f,Animation.RELATIVE_TO_SELF, 0.0f
        ); 
        animation.setDuration(100);
        set.addAnimation(animation);
 
        LayoutAnimationController controller = new LayoutAnimationController(set, 0.5f);
        ListView listView = getListView();        
        listView.setLayoutAnimation(controller);
    } 
 
    private String[] mStrings = {
        "Bordeaux", 
        "Lyon", 
        "Marseille", 
        "Nancy", 
        "Paris", 
        "Toulouse", 
        "Strasbourg" 
    }; 
} 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
This code example shows how to use the following methods:
This code example shows how to use the following methods:
		animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF,
				-1.0f, Animation.RELATIVE_TO_SELF, 0.0f);
		animation.setDuration(300);
		set.addAnimation(animation);
 
		LayoutAnimationController controller = new LayoutAnimationController(set, 0.5f);
		lv.setLayoutAnimation(controller);
	} 
 
	/** 
	 * Get sizes for drawing elements 
	 *  
	 * @param textType 
	 * @return 
	 */ 
	public static int getScreenDependentItemSize(int textType) {
		int screenWidth = AppCAP.getScreenWidth();
 
		switch (textType) {
		case TEXT_TYPE_MAP_BLACK_PIN:
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
  /** 
   * @return an animation controller 
   */ 
  public static LayoutAnimationController goDownAnimationController() {
    final float delay = 0.5f;
    return new LayoutAnimationController(goDownAnimation(), delay);
  } 
 
  private static Animation moveAnimation(final float fromX, final float toX, final float fromY, final float toY) {
    final long moveDuration = 200,
    alphaDuration = 100;
 
    final AnimationSet main = new AnimationSet(false);
 
    Animation animation = new AlphaAnimation(0.0f, 1.0f);
    animation.setDuration(alphaDuration);
    main.addAnimation(animation);
 
    animation = new TranslateAnimation(
        Animation.RELATIVE_TO_SELF, fromX, Animation.RELATIVE_TO_SELF, toX,
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
				Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF,
				-1.0f, Animation.RELATIVE_TO_SELF, 0.0f);
		animation.setDuration(100);
		set.addAnimation(animation);
 
		LayoutAnimationController controller = new LayoutAnimationController(
				set, 0.5f);
		return controller;
	} 
	@Override 
	public void onCreateContextMenu(ContextMenu menu, View v,
			ContextMenu.ContextMenuInfo menuInfo) {
		populateMenu(menu);
	} 
 
	@Override 
	public boolean onOptionsItemSelected(MenuItem item) {
		return (applyMenuChoice(item) || super.onOptionsItemSelected(item));
	} 
 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
This code example shows how to use the following methods:
		AnimationSet set = new AnimationSet(true);
 
		Animation animation = AnimationHelper.createFadeInAnimation();
		set.addAnimation(animation);
 
		LayoutAnimationController controller = new LayoutAnimationController(set, 0.5f);
		setLayoutAnimation(controller);
	} 
 
	// Add a listener so we know when the user is long pressing on one of our rows 
	// we then pass this interaction to the adapter 
	@Override 
	public boolean onItemLongClick(AdapterView<?> adapter, View view, int position, long id) {
		fruitAdapter.delete(position);
		return true; 
	} 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java

Related Android LayoutAnimationController Questions & Answers:

See Code Examples for Android LayoutAnimationController Methods: