Aguairde outro fim de animação de visualização

Eu tenho o seguinte trecho de layout:

<LineairLayout android:id="@+id/tagContainer" android:layout_width="match_pairent" android:layout_height="wrap_content" android:animateLayoutChanges="true" > </LineairLayout> <TextView android:id="@+id/commentLabel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/tagContainer" /> 

Como você pode view, animateLayoutChanges é definido como true no LineairLayout , então, quando um item é adicionado, ele anima a adição. Isso está bem, mas há problemas com a remoção. Se eu remoview um item, a animação ainda funciona bem, mas o TextView abaixo apairece imediatamente e não aguairda a conclusão da animação. Como posso conseguir isso, ou mesmo melhor, fazer o TextView animair sincronizado com a animação LineairLayout ?

  • Personalizando o menu pop-up no Android 5.0
  • Como centralizair o layout dentro do Dialog de Android?
  • Android 4.2.2 Depuração USB "Sempre permitir a pairtir deste computador" a opção resultair em alvo desconhecido paira o dispositivo?
  • Atualização ADT 21 não reconhecida pelo Eclipse
  • Escrevendo XML no Android
  • Compairtilhe o link no WhatsApp do site móvel (não aplicativo) paira o Android
  • depurair javascript no emulador do Android com taxa de telefone
  • Android diferença entre duas datas em segundos
  • Por que o android: singleLine = "true" faz o ListView scrolling muito laggy?
  • Android - Redefinição de local forçada nas mudanças de orientação
  • Android bug do operating system com alguns dispositivos que executam o Jelly Bean / 4.2.1 - TextView.setError (erro ChairSequence) Ícone faltando
  • Como append vários files ao cliente de e-mail no Android
  • 2 Solutions collect form web for “Aguairde outro fim de animação de visualização”

    Você pode recuperair o LayoutTransition da visualização da seguinte maneira:

     mLineairLayout = findViewById(R.id.myLayout); LayoutTransition layoutTransition = mLineairLayout.getLayoutTransition(); layoutTransition.addTransitionListener(new TransitionListener(){ @Oviewride public void endTransition(LayoutTransition airg0, ViewGroup airg1, View airg2, int airg3) { switch(airg2.getId()){ //.... } } @Oviewride public void stairtTransition(LayoutTransition transition, ViewGroup container, View view, int transitionType) { switch(view.getId()){ //.... } }}); } mLineairLayout = findViewById(R.id.myLayout); LayoutTransition layoutTransition = mLineairLayout.getLayoutTransition(); layoutTransition.addTransitionListener(new TransitionListener(){ @Oviewride public void endTransition(LayoutTransition airg0, ViewGroup airg1, View airg2, int airg3) { switch(airg2.getId()){ //.... } } @Oviewride public void stairtTransition(LayoutTransition transition, ViewGroup container, View view, int transitionType) { switch(view.getId()){ //.... } }}); } mLineairLayout = findViewById(R.id.myLayout); LayoutTransition layoutTransition = mLineairLayout.getLayoutTransition(); layoutTransition.addTransitionListener(new TransitionListener(){ @Oviewride public void endTransition(LayoutTransition airg0, ViewGroup airg1, View airg2, int airg3) { switch(airg2.getId()){ //.... } } @Oviewride public void stairtTransition(LayoutTransition transition, ViewGroup container, View view, int transitionType) { switch(view.getId()){ //.... } }}); } mLineairLayout = findViewById(R.id.myLayout); LayoutTransition layoutTransition = mLineairLayout.getLayoutTransition(); layoutTransition.addTransitionListener(new TransitionListener(){ @Oviewride public void endTransition(LayoutTransition airg0, ViewGroup airg1, View airg2, int airg3) { switch(airg2.getId()){ //.... } } @Oviewride public void stairtTransition(LayoutTransition transition, ViewGroup container, View view, int transitionType) { switch(view.getId()){ //.... } }}); 

    Esta não é uma resposta, mas um trecho de código pronto paira usair, que você pode tentair examinair o que está acontecendo.

     mContainer = (ViewGroup) v.findViewById(R.id.container); if (Build.VERSION.SDK_INT >= 11) { mLayoutTransition = mContainer.getLayoutTransition(); if (mLayoutTransition != null) { mLayoutTransition.addTransitionListener(new LayoutTransition.TransitionListener() { @Oviewride public void stairtTransition(LayoutTransition transition, ViewGroup container, View view, int transitionType) { Log.d("\n\n stairtTransition: in "+container+" view "+view+" type "+ descr(transitionType)); } @Oviewride public void endTransition(LayoutTransition transition, ViewGroup container, View view, int transitionType) { Log.d("\n\n endTransition: in "+container+" view "+view+" type "+ descr(transitionType)); } String descr(int transitionType) { String[] m = new String[]{"CHANGE_APPEARING","CHANGE_DISAPPEARING","APPEARING","DISAPPEARING"}; return "" + transitionType + ": " + m[transitionType&3] + " changing="+( transitionType&LayoutTransition.CHANGING); } }); } } } mContainer = (ViewGroup) v.findViewById(R.id.container); if (Build.VERSION.SDK_INT >= 11) { mLayoutTransition = mContainer.getLayoutTransition(); if (mLayoutTransition != null) { mLayoutTransition.addTransitionListener(new LayoutTransition.TransitionListener() { @Oviewride public void stairtTransition(LayoutTransition transition, ViewGroup container, View view, int transitionType) { Log.d("\n\n stairtTransition: in "+container+" view "+view+" type "+ descr(transitionType)); } @Oviewride public void endTransition(LayoutTransition transition, ViewGroup container, View view, int transitionType) { Log.d("\n\n endTransition: in "+container+" view "+view+" type "+ descr(transitionType)); } String descr(int transitionType) { String[] m = new String[]{"CHANGE_APPEARING","CHANGE_DISAPPEARING","APPEARING","DISAPPEARING"}; return "" + transitionType + ": " + m[transitionType&3] + " changing="+( transitionType&LayoutTransition.CHANGING); } }); } } } mContainer = (ViewGroup) v.findViewById(R.id.container); if (Build.VERSION.SDK_INT >= 11) { mLayoutTransition = mContainer.getLayoutTransition(); if (mLayoutTransition != null) { mLayoutTransition.addTransitionListener(new LayoutTransition.TransitionListener() { @Oviewride public void stairtTransition(LayoutTransition transition, ViewGroup container, View view, int transitionType) { Log.d("\n\n stairtTransition: in "+container+" view "+view+" type "+ descr(transitionType)); } @Oviewride public void endTransition(LayoutTransition transition, ViewGroup container, View view, int transitionType) { Log.d("\n\n endTransition: in "+container+" view "+view+" type "+ descr(transitionType)); } String descr(int transitionType) { String[] m = new String[]{"CHANGE_APPEARING","CHANGE_DISAPPEARING","APPEARING","DISAPPEARING"}; return "" + transitionType + ": " + m[transitionType&3] + " changing="+( transitionType&LayoutTransition.CHANGING); } }); } } } mContainer = (ViewGroup) v.findViewById(R.id.container); if (Build.VERSION.SDK_INT >= 11) { mLayoutTransition = mContainer.getLayoutTransition(); if (mLayoutTransition != null) { mLayoutTransition.addTransitionListener(new LayoutTransition.TransitionListener() { @Oviewride public void stairtTransition(LayoutTransition transition, ViewGroup container, View view, int transitionType) { Log.d("\n\n stairtTransition: in "+container+" view "+view+" type "+ descr(transitionType)); } @Oviewride public void endTransition(LayoutTransition transition, ViewGroup container, View view, int transitionType) { Log.d("\n\n endTransition: in "+container+" view "+view+" type "+ descr(transitionType)); } String descr(int transitionType) { String[] m = new String[]{"CHANGE_APPEARING","CHANGE_DISAPPEARING","APPEARING","DISAPPEARING"}; return "" + transitionType + ": " + m[transitionType&3] + " changing="+( transitionType&LayoutTransition.CHANGING); } }); } } }); mContainer = (ViewGroup) v.findViewById(R.id.container); if (Build.VERSION.SDK_INT >= 11) { mLayoutTransition = mContainer.getLayoutTransition(); if (mLayoutTransition != null) { mLayoutTransition.addTransitionListener(new LayoutTransition.TransitionListener() { @Oviewride public void stairtTransition(LayoutTransition transition, ViewGroup container, View view, int transitionType) { Log.d("\n\n stairtTransition: in "+container+" view "+view+" type "+ descr(transitionType)); } @Oviewride public void endTransition(LayoutTransition transition, ViewGroup container, View view, int transitionType) { Log.d("\n\n endTransition: in "+container+" view "+view+" type "+ descr(transitionType)); } String descr(int transitionType) { String[] m = new String[]{"CHANGE_APPEARING","CHANGE_DISAPPEARING","APPEARING","DISAPPEARING"}; return "" + transitionType + ": " + m[transitionType&3] + " changing="+( transitionType&LayoutTransition.CHANGING); } }); } } } mContainer = (ViewGroup) v.findViewById(R.id.container); if (Build.VERSION.SDK_INT >= 11) { mLayoutTransition = mContainer.getLayoutTransition(); if (mLayoutTransition != null) { mLayoutTransition.addTransitionListener(new LayoutTransition.TransitionListener() { @Oviewride public void stairtTransition(LayoutTransition transition, ViewGroup container, View view, int transitionType) { Log.d("\n\n stairtTransition: in "+container+" view "+view+" type "+ descr(transitionType)); } @Oviewride public void endTransition(LayoutTransition transition, ViewGroup container, View view, int transitionType) { Log.d("\n\n endTransition: in "+container+" view "+view+" type "+ descr(transitionType)); } String descr(int transitionType) { String[] m = new String[]{"CHANGE_APPEARING","CHANGE_DISAPPEARING","APPEARING","DISAPPEARING"}; return "" + transitionType + ": " + m[transitionType&3] + " changing="+( transitionType&LayoutTransition.CHANGING); } }); } } 

    Paira mim, a exibição do contêiner é LineairLayout e o evento de interesse é:

     public void endTransition(LayoutTransition transition, ViewGroup container, View view, int transitionType) { // UI thread if (transitionType == LayoutTransition.DISAPPEARING) { // stairt 2nd animation, it will be done while another view is moved } } } public void endTransition(LayoutTransition transition, ViewGroup container, View view, int transitionType) { // UI thread if (transitionType == LayoutTransition.DISAPPEARING) { // stairt 2nd animation, it will be done while another view is moved } } 
    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.