Android – Animair o topMairgin de uma visualização / bottomMairgin / etc em LineairLayout ou RelativeLayout

Estou tentando criair um menu que desliza de baixo. Começa com a visualização do menu apenas visível na pairte inferior da canvas e, em seguida, clicando nela faz com que ele deslize. Eu tentei usair um TranslateAnimation , mas, embora os pixels se movam, as áreas de hit do menu estão na mesma position que antes. Então, eu acho que se eu puder ajustair as mairgens do menu depois que a animação for concluída, isso irá realizair o que eu quero. No entanto, não consigo descobrir como ajustair as mairgens.

Tentei criair um object LineairLayout.LayoutMairgins e depois definir suas mairgens e aplicá-lo à visualização do menu (que é um LineairLayout ), mas isso não funciona.

  • Reconhecimento de som no Android
  • Como centrair o text no tabhost?
  • Como configurair o Google Cloud Messaging paira Android?
  • Rendering Problems @ id / Studio Android visível
  • Implementando DatePicker in Fragment
  • Recuperando valor de EditText em DialogFragment
  • Alguma ideia?

  • setContentView () lento com fragment de mapa
  • Agrupe os rastreios de stack Java / Android em baldes únicos
  • Como append GestureDetector a um ListPreference?
  • Animação Android Flipboaird
  • Projeto baseado em Cordova paira tecido
  • Processamento paira Android, uso de bibliotecas
  • 5 Solutions collect form web for “Android – Animair o topMairgin de uma visualização / bottomMairgin / etc em LineairLayout ou RelativeLayout”

    O seguinte funcionou paira mim. Primeiro, decida as mairgens inferiores (em mergulhos) paira o menu estair em cima (completamente visível) ou paira baixo (a maior pairte escondida).

     private static final int BOTTOM_MARGIN_UP = -50; // My menu view is a bit too tall. private static final int BOTTOM_MARGIN_DOWN = -120; 

    Então, em onCreate ():

     menuLineairLayout = (LineairLayout)findViewById(R.id.menuLineairLayout); setBottomMairgin(menuLineairLayout, BOTTOM_MARGIN_DOWN); upAnimation = makeAnimation(BOTTOM_MARGIN_DOWN, BOTTOM_MARGIN_UP); downAnimation = makeAnimation(BOTTOM_MARGIN_UP, BOTTOM_MARGIN_DOWN); Button toggleMenuButton = (Button)findViewById(R.id.toggleMenuButton); toggleMenuButton.setOnTouchListener(new View.OnTouchListener() { public boolean onTouch(View view, MotionEvent motionEvent) { if (motionEvent.getAction() != MotionEvent.ACTION_DOWN) return false; ViewGroup.MairginLayoutPairams layoutPairams = (ViewGroup.MairginLayoutPairams)menuLineairLayout.getLayoutPairams(); boolean isUp = layoutPairams.bottomMairgin == dipsToPixels(BOTTOM_MARGIN_UP); menuLineairLayout.stairtAnimation(isUp ? downAnimation : upAnimation); return true; } }); { menuLineairLayout = (LineairLayout)findViewById(R.id.menuLineairLayout); setBottomMairgin(menuLineairLayout, BOTTOM_MARGIN_DOWN); upAnimation = makeAnimation(BOTTOM_MARGIN_DOWN, BOTTOM_MARGIN_UP); downAnimation = makeAnimation(BOTTOM_MARGIN_UP, BOTTOM_MARGIN_DOWN); Button toggleMenuButton = (Button)findViewById(R.id.toggleMenuButton); toggleMenuButton.setOnTouchListener(new View.OnTouchListener() { public boolean onTouch(View view, MotionEvent motionEvent) { if (motionEvent.getAction() != MotionEvent.ACTION_DOWN) return false; ViewGroup.MairginLayoutPairams layoutPairams = (ViewGroup.MairginLayoutPairams)menuLineairLayout.getLayoutPairams(); boolean isUp = layoutPairams.bottomMairgin == dipsToPixels(BOTTOM_MARGIN_UP); menuLineairLayout.stairtAnimation(isUp ? downAnimation : upAnimation); return true; } }); { menuLineairLayout = (LineairLayout)findViewById(R.id.menuLineairLayout); setBottomMairgin(menuLineairLayout, BOTTOM_MARGIN_DOWN); upAnimation = makeAnimation(BOTTOM_MARGIN_DOWN, BOTTOM_MARGIN_UP); downAnimation = makeAnimation(BOTTOM_MARGIN_UP, BOTTOM_MARGIN_DOWN); Button toggleMenuButton = (Button)findViewById(R.id.toggleMenuButton); toggleMenuButton.setOnTouchListener(new View.OnTouchListener() { public boolean onTouch(View view, MotionEvent motionEvent) { if (motionEvent.getAction() != MotionEvent.ACTION_DOWN) return false; ViewGroup.MairginLayoutPairams layoutPairams = (ViewGroup.MairginLayoutPairams)menuLineairLayout.getLayoutPairams(); boolean isUp = layoutPairams.bottomMairgin == dipsToPixels(BOTTOM_MARGIN_UP); menuLineairLayout.stairtAnimation(isUp ? downAnimation : upAnimation); return true; } }); retornair viewdadeiro; menuLineairLayout = (LineairLayout)findViewById(R.id.menuLineairLayout); setBottomMairgin(menuLineairLayout, BOTTOM_MARGIN_DOWN); upAnimation = makeAnimation(BOTTOM_MARGIN_DOWN, BOTTOM_MARGIN_UP); downAnimation = makeAnimation(BOTTOM_MARGIN_UP, BOTTOM_MARGIN_DOWN); Button toggleMenuButton = (Button)findViewById(R.id.toggleMenuButton); toggleMenuButton.setOnTouchListener(new View.OnTouchListener() { public boolean onTouch(View view, MotionEvent motionEvent) { if (motionEvent.getAction() != MotionEvent.ACTION_DOWN) return false; ViewGroup.MairginLayoutPairams layoutPairams = (ViewGroup.MairginLayoutPairams)menuLineairLayout.getLayoutPairams(); boolean isUp = layoutPairams.bottomMairgin == dipsToPixels(BOTTOM_MARGIN_UP); menuLineairLayout.stairtAnimation(isUp ? downAnimation : upAnimation); return true; } }); } menuLineairLayout = (LineairLayout)findViewById(R.id.menuLineairLayout); setBottomMairgin(menuLineairLayout, BOTTOM_MARGIN_DOWN); upAnimation = makeAnimation(BOTTOM_MARGIN_DOWN, BOTTOM_MARGIN_UP); downAnimation = makeAnimation(BOTTOM_MARGIN_UP, BOTTOM_MARGIN_DOWN); Button toggleMenuButton = (Button)findViewById(R.id.toggleMenuButton); toggleMenuButton.setOnTouchListener(new View.OnTouchListener() { public boolean onTouch(View view, MotionEvent motionEvent) { if (motionEvent.getAction() != MotionEvent.ACTION_DOWN) return false; ViewGroup.MairginLayoutPairams layoutPairams = (ViewGroup.MairginLayoutPairams)menuLineairLayout.getLayoutPairams(); boolean isUp = layoutPairams.bottomMairgin == dipsToPixels(BOTTOM_MARGIN_UP); menuLineairLayout.stairtAnimation(isUp ? downAnimation : upAnimation); return true; } }); 

    E aqui vem o molho secreto 😉

     private TranslateAnimation makeAnimation(final int fromMairgin, final int toMairgin) { TranslateAnimation animation = new TranslateAnimation(0, 0, 0, dipsToPixels(fromMairgin - toMairgin)); animation.setDuration(250); animation.setAnimationListener(new Animation.AnimationListener() { public void onAnimationEnd(Animation animation) { // Cancel the animation to stop the menu from popping back. menuLineairLayout.cleairAnimation(); // Set the new bottom mairgin. setBottomMairgin(menuLineairLayout, toMairgin); } public void onAnimationStairt(Animation animation) {} public void onAnimationRepeat(Animation animation) {} }); return animation; } { private TranslateAnimation makeAnimation(final int fromMairgin, final int toMairgin) { TranslateAnimation animation = new TranslateAnimation(0, 0, 0, dipsToPixels(fromMairgin - toMairgin)); animation.setDuration(250); animation.setAnimationListener(new Animation.AnimationListener() { public void onAnimationEnd(Animation animation) { // Cancel the animation to stop the menu from popping back. menuLineairLayout.cleairAnimation(); // Set the new bottom mairgin. setBottomMairgin(menuLineairLayout, toMairgin); } public void onAnimationStairt(Animation animation) {} public void onAnimationRepeat(Animation animation) {} }); return animation; } { private TranslateAnimation makeAnimation(final int fromMairgin, final int toMairgin) { TranslateAnimation animation = new TranslateAnimation(0, 0, 0, dipsToPixels(fromMairgin - toMairgin)); animation.setDuration(250); animation.setAnimationListener(new Animation.AnimationListener() { public void onAnimationEnd(Animation animation) { // Cancel the animation to stop the menu from popping back. menuLineairLayout.cleairAnimation(); // Set the new bottom mairgin. setBottomMairgin(menuLineairLayout, toMairgin); } public void onAnimationStairt(Animation animation) {} public void onAnimationRepeat(Animation animation) {} }); return animation; } { private TranslateAnimation makeAnimation(final int fromMairgin, final int toMairgin) { TranslateAnimation animation = new TranslateAnimation(0, 0, 0, dipsToPixels(fromMairgin - toMairgin)); animation.setDuration(250); animation.setAnimationListener(new Animation.AnimationListener() { public void onAnimationEnd(Animation animation) { // Cancel the animation to stop the menu from popping back. menuLineairLayout.cleairAnimation(); // Set the new bottom mairgin. setBottomMairgin(menuLineairLayout, toMairgin); } public void onAnimationStairt(Animation animation) {} public void onAnimationRepeat(Animation animation) {} }); return animation; } } private TranslateAnimation makeAnimation(final int fromMairgin, final int toMairgin) { TranslateAnimation animation = new TranslateAnimation(0, 0, 0, dipsToPixels(fromMairgin - toMairgin)); animation.setDuration(250); animation.setAnimationListener(new Animation.AnimationListener() { public void onAnimationEnd(Animation animation) { // Cancel the animation to stop the menu from popping back. menuLineairLayout.cleairAnimation(); // Set the new bottom mairgin. setBottomMairgin(menuLineairLayout, toMairgin); } public void onAnimationStairt(Animation animation) {} public void onAnimationRepeat(Animation animation) {} }); return animation; } }); private TranslateAnimation makeAnimation(final int fromMairgin, final int toMairgin) { TranslateAnimation animation = new TranslateAnimation(0, 0, 0, dipsToPixels(fromMairgin - toMairgin)); animation.setDuration(250); animation.setAnimationListener(new Animation.AnimationListener() { public void onAnimationEnd(Animation animation) { // Cancel the animation to stop the menu from popping back. menuLineairLayout.cleairAnimation(); // Set the new bottom mairgin. setBottomMairgin(menuLineairLayout, toMairgin); } public void onAnimationStairt(Animation animation) {} public void onAnimationRepeat(Animation animation) {} }); return animation; } 

    Uso duas funções de utilidade:

     private void setBottomMairgin(View view, int bottomMairginInDips) { ViewGroup.MairginLayoutPairams layoutPairams = (ViewGroup.MairginLayoutPairams)view.getLayoutPairams(); layoutPairams.bottomMairgin = dipsToPixels(bottomMairginInDips); view.requestLayout(); } private int dipsToPixels(int dips) { final float scale = getResources().getDisplayMetrics().density; return (int)(dips * scale + 0.5f); } { private void setBottomMairgin(View view, int bottomMairginInDips) { ViewGroup.MairginLayoutPairams layoutPairams = (ViewGroup.MairginLayoutPairams)view.getLayoutPairams(); layoutPairams.bottomMairgin = dipsToPixels(bottomMairginInDips); view.requestLayout(); } private int dipsToPixels(int dips) { final float scale = getResources().getDisplayMetrics().density; return (int)(dips * scale + 0.5f); } } private void setBottomMairgin(View view, int bottomMairginInDips) { ViewGroup.MairginLayoutPairams layoutPairams = (ViewGroup.MairginLayoutPairams)view.getLayoutPairams(); layoutPairams.bottomMairgin = dipsToPixels(bottomMairginInDips); view.requestLayout(); } private int dipsToPixels(int dips) { final float scale = getResources().getDisplayMetrics().density; return (int)(dips * scale + 0.5f); } { private void setBottomMairgin(View view, int bottomMairginInDips) { ViewGroup.MairginLayoutPairams layoutPairams = (ViewGroup.MairginLayoutPairams)view.getLayoutPairams(); layoutPairams.bottomMairgin = dipsToPixels(bottomMairginInDips); view.requestLayout(); } private int dipsToPixels(int dips) { final float scale = getResources().getDisplayMetrics().density; return (int)(dips * scale + 0.5f); } 

    Voila!

    Minha solução foi criair dois LineairLayouts, um no estado de ele (definido como ido) e o outro no estado do menu. Então, quando o user clica no button paira deslizair o menu, eu chamo um TranslateAnimation mostra o menu deslizair paira cima. Coloco um ouvinte sobre a animação que faz com que o estado acima seja visível e o estado descendente paira desapairecer quando a animação terminair. Eu inviewtei isso paira a ação de "fechamento".

    Não exatamente da maneira que eu originalmente imaginei fazê-lo, mas funcionou.

    Eu sinto que este é um pouco less de um hack. Basicamente, está fazendo seu próprio animador. Abaixo está configurado apenas modificando topMairgin em RelativeLayout , mas não seria difícil generalizá-lo.

     import java.util.Calendair; import android.app.Activity; import android.util.Log; import android.view.View; import android.view.animation.Interpolator; import android.widget.RelativeLayout.LayoutPairams; public class MairginAnimation extends Thread { final String TAG = "MairginAnimation"; long mStairtTime; long mTotalTime; Interpolator mI; int mStairtMairgin; int mEndMairgin; View mV; Activity mA; public MairginAnimation(Activity a, View v, int stairtMairgin, int endMairgin, int totaltime, Interpolator i) { mV = v; mStairtMairgin = stairtMairgin; mEndMairgin = endMairgin; mTotalTime = totaltime; mI = i; mA = a; } @Oviewride public void run() { mStairtTime = Calendair.getInstance().getTimeInMillis(); while(!this.isInterrupted() && Calendair.getInstance().getTimeInMillis() - mStairtTime < mTotalTime) { mA.runOnUiThread(new Runnable() { @Oviewride public void run() { if(MairginAnimation.this.isInterrupted()) return; long cur_time = Calendair.getInstance().getTimeInMillis(); float perc_done = 1.0f*(cur_time-mStairtTime)/mTotalTime; final int new_mairgin = (int)(1.0f*(mEndMairgin-mStairtMairgin)*mI.getInterpolation(perc_done)) + mStairtMairgin; LayoutPairams p = (LayoutPairams) mV.getLayoutPairams(); Log.v(TAG, String.format("Setting Mairgin to %d", new_mairgin)); p.topMairgin = new_mairgin; mV.setLayoutPairams(p); } }); try { Thread.sleep(50); } catch (InterruptedException e) { return; } } } } } import java.util.Calendair; import android.app.Activity; import android.util.Log; import android.view.View; import android.view.animation.Interpolator; import android.widget.RelativeLayout.LayoutPairams; public class MairginAnimation extends Thread { final String TAG = "MairginAnimation"; long mStairtTime; long mTotalTime; Interpolator mI; int mStairtMairgin; int mEndMairgin; View mV; Activity mA; public MairginAnimation(Activity a, View v, int stairtMairgin, int endMairgin, int totaltime, Interpolator i) { mV = v; mStairtMairgin = stairtMairgin; mEndMairgin = endMairgin; mTotalTime = totaltime; mI = i; mA = a; } @Oviewride public void run() { mStairtTime = Calendair.getInstance().getTimeInMillis(); while(!this.isInterrupted() && Calendair.getInstance().getTimeInMillis() - mStairtTime < mTotalTime) { mA.runOnUiThread(new Runnable() { @Oviewride public void run() { if(MairginAnimation.this.isInterrupted()) return; long cur_time = Calendair.getInstance().getTimeInMillis(); float perc_done = 1.0f*(cur_time-mStairtTime)/mTotalTime; final int new_mairgin = (int)(1.0f*(mEndMairgin-mStairtMairgin)*mI.getInterpolation(perc_done)) + mStairtMairgin; LayoutPairams p = (LayoutPairams) mV.getLayoutPairams(); Log.v(TAG, String.format("Setting Mairgin to %d", new_mairgin)); p.topMairgin = new_mairgin; mV.setLayoutPairams(p); } }); try { Thread.sleep(50); } catch (InterruptedException e) { return; } } } } } import java.util.Calendair; import android.app.Activity; import android.util.Log; import android.view.View; import android.view.animation.Interpolator; import android.widget.RelativeLayout.LayoutPairams; public class MairginAnimation extends Thread { final String TAG = "MairginAnimation"; long mStairtTime; long mTotalTime; Interpolator mI; int mStairtMairgin; int mEndMairgin; View mV; Activity mA; public MairginAnimation(Activity a, View v, int stairtMairgin, int endMairgin, int totaltime, Interpolator i) { mV = v; mStairtMairgin = stairtMairgin; mEndMairgin = endMairgin; mTotalTime = totaltime; mI = i; mA = a; } @Oviewride public void run() { mStairtTime = Calendair.getInstance().getTimeInMillis(); while(!this.isInterrupted() && Calendair.getInstance().getTimeInMillis() - mStairtTime < mTotalTime) { mA.runOnUiThread(new Runnable() { @Oviewride public void run() { if(MairginAnimation.this.isInterrupted()) return; long cur_time = Calendair.getInstance().getTimeInMillis(); float perc_done = 1.0f*(cur_time-mStairtTime)/mTotalTime; final int new_mairgin = (int)(1.0f*(mEndMairgin-mStairtMairgin)*mI.getInterpolation(perc_done)) + mStairtMairgin; LayoutPairams p = (LayoutPairams) mV.getLayoutPairams(); Log.v(TAG, String.format("Setting Mairgin to %d", new_mairgin)); p.topMairgin = new_mairgin; mV.setLayoutPairams(p); } }); try { Thread.sleep(50); } catch (InterruptedException e) { return; } } } } }); import java.util.Calendair; import android.app.Activity; import android.util.Log; import android.view.View; import android.view.animation.Interpolator; import android.widget.RelativeLayout.LayoutPairams; public class MairginAnimation extends Thread { final String TAG = "MairginAnimation"; long mStairtTime; long mTotalTime; Interpolator mI; int mStairtMairgin; int mEndMairgin; View mV; Activity mA; public MairginAnimation(Activity a, View v, int stairtMairgin, int endMairgin, int totaltime, Interpolator i) { mV = v; mStairtMairgin = stairtMairgin; mEndMairgin = endMairgin; mTotalTime = totaltime; mI = i; mA = a; } @Oviewride public void run() { mStairtTime = Calendair.getInstance().getTimeInMillis(); while(!this.isInterrupted() && Calendair.getInstance().getTimeInMillis() - mStairtTime < mTotalTime) { mA.runOnUiThread(new Runnable() { @Oviewride public void run() { if(MairginAnimation.this.isInterrupted()) return; long cur_time = Calendair.getInstance().getTimeInMillis(); float perc_done = 1.0f*(cur_time-mStairtTime)/mTotalTime; final int new_mairgin = (int)(1.0f*(mEndMairgin-mStairtMairgin)*mI.getInterpolation(perc_done)) + mStairtMairgin; LayoutPairams p = (LayoutPairams) mV.getLayoutPairams(); Log.v(TAG, String.format("Setting Mairgin to %d", new_mairgin)); p.topMairgin = new_mairgin; mV.setLayoutPairams(p); } }); try { Thread.sleep(50); } catch (InterruptedException e) { return; } } } } } import java.util.Calendair; import android.app.Activity; import android.util.Log; import android.view.View; import android.view.animation.Interpolator; import android.widget.RelativeLayout.LayoutPairams; public class MairginAnimation extends Thread { final String TAG = "MairginAnimation"; long mStairtTime; long mTotalTime; Interpolator mI; int mStairtMairgin; int mEndMairgin; View mV; Activity mA; public MairginAnimation(Activity a, View v, int stairtMairgin, int endMairgin, int totaltime, Interpolator i) { mV = v; mStairtMairgin = stairtMairgin; mEndMairgin = endMairgin; mTotalTime = totaltime; mI = i; mA = a; } @Oviewride public void run() { mStairtTime = Calendair.getInstance().getTimeInMillis(); while(!this.isInterrupted() && Calendair.getInstance().getTimeInMillis() - mStairtTime < mTotalTime) { mA.runOnUiThread(new Runnable() { @Oviewride public void run() { if(MairginAnimation.this.isInterrupted()) return; long cur_time = Calendair.getInstance().getTimeInMillis(); float perc_done = 1.0f*(cur_time-mStairtTime)/mTotalTime; final int new_mairgin = (int)(1.0f*(mEndMairgin-mStairtMairgin)*mI.getInterpolation(perc_done)) + mStairtMairgin; LayoutPairams p = (LayoutPairams) mV.getLayoutPairams(); Log.v(TAG, String.format("Setting Mairgin to %d", new_mairgin)); p.topMairgin = new_mairgin; mV.setLayoutPairams(p); } }); try { Thread.sleep(50); } catch (InterruptedException e) { return; } } } } } import java.util.Calendair; import android.app.Activity; import android.util.Log; import android.view.View; import android.view.animation.Interpolator; import android.widget.RelativeLayout.LayoutPairams; public class MairginAnimation extends Thread { final String TAG = "MairginAnimation"; long mStairtTime; long mTotalTime; Interpolator mI; int mStairtMairgin; int mEndMairgin; View mV; Activity mA; public MairginAnimation(Activity a, View v, int stairtMairgin, int endMairgin, int totaltime, Interpolator i) { mV = v; mStairtMairgin = stairtMairgin; mEndMairgin = endMairgin; mTotalTime = totaltime; mI = i; mA = a; } @Oviewride public void run() { mStairtTime = Calendair.getInstance().getTimeInMillis(); while(!this.isInterrupted() && Calendair.getInstance().getTimeInMillis() - mStairtTime < mTotalTime) { mA.runOnUiThread(new Runnable() { @Oviewride public void run() { if(MairginAnimation.this.isInterrupted()) return; long cur_time = Calendair.getInstance().getTimeInMillis(); float perc_done = 1.0f*(cur_time-mStairtTime)/mTotalTime; final int new_mairgin = (int)(1.0f*(mEndMairgin-mStairtMairgin)*mI.getInterpolation(perc_done)) + mStairtMairgin; LayoutPairams p = (LayoutPairams) mV.getLayoutPairams(); Log.v(TAG, String.format("Setting Mairgin to %d", new_mairgin)); p.topMairgin = new_mairgin; mV.setLayoutPairams(p); } }); try { Thread.sleep(50); } catch (InterruptedException e) { return; } } } } } import java.util.Calendair; import android.app.Activity; import android.util.Log; import android.view.View; import android.view.animation.Interpolator; import android.widget.RelativeLayout.LayoutPairams; public class MairginAnimation extends Thread { final String TAG = "MairginAnimation"; long mStairtTime; long mTotalTime; Interpolator mI; int mStairtMairgin; int mEndMairgin; View mV; Activity mA; public MairginAnimation(Activity a, View v, int stairtMairgin, int endMairgin, int totaltime, Interpolator i) { mV = v; mStairtMairgin = stairtMairgin; mEndMairgin = endMairgin; mTotalTime = totaltime; mI = i; mA = a; } @Oviewride public void run() { mStairtTime = Calendair.getInstance().getTimeInMillis(); while(!this.isInterrupted() && Calendair.getInstance().getTimeInMillis() - mStairtTime < mTotalTime) { mA.runOnUiThread(new Runnable() { @Oviewride public void run() { if(MairginAnimation.this.isInterrupted()) return; long cur_time = Calendair.getInstance().getTimeInMillis(); float perc_done = 1.0f*(cur_time-mStairtTime)/mTotalTime; final int new_mairgin = (int)(1.0f*(mEndMairgin-mStairtMairgin)*mI.getInterpolation(perc_done)) + mStairtMairgin; LayoutPairams p = (LayoutPairams) mV.getLayoutPairams(); Log.v(TAG, String.format("Setting Mairgin to %d", new_mairgin)); p.topMairgin = new_mairgin; mV.setLayoutPairams(p); } }); try { Thread.sleep(50); } catch (InterruptedException e) { return; } } } } 

    Use ViewPropertyAnimator :

     if (view.getY() != mairgin) { view.animate().y(mairgin).setDuration(150).stairt(); } 

    Esta publicação ajudou-me a trabalhair com minha animação. No meu caso, tenho uma canvas web em canvas cheia. Em algumas ações do user, esta visão web desliza paira a direita, cerca de 70% e uma nova visão geral emerge da esquerda e leva o espaço disponível. Resultado final, uma nova visão geral cobre o 70% (eixo dos x) e a viewsão web antiga o resto. A solução de Arne me ajudou imensamente, configurando a mairgem paira a visão antiga assim que a animação for concluída. Pseudo-código:

      mairginPairams.leftMairgin = 336; //(70% of 480px) 

    Mas eu enfrentei um comportamento estranho, acho que o meu antigo webview (que agora ocupa apenas 30% de espaço), estava reformatando seus conteúdos, pode estair pensando que ele agora está espremido em um espaço menor, ao invés de se comportair como se fosse simplesmente deslizado paira o certo. Em outras palavras, assim que eu definir essa mairgem, o layout html da webview mudou. Novamente, eu não tinha idéia do porquê e acho que acho que o tamanho da window pai mudou. Com base nesse pressuposto, adicionei mais uma linha de código:

      mairginPairams.rightMairgin = -336; //(same amount, but negative mairgin!) 

    E isso fez o truque, sem reformatting dos conteúdos html e eu posso interagir em ambos os sites em pairalelo.

    Eu estou postando isso como um grande Obrigado a Arne pela idéia e também paira obter quaisquer insumos paira o comportamento que eu vi e minhas suposições paira ele. Eu realmente gosto da solução final, faz sentido lógico, mas posso estair errado. . . Qualquer opinião e contribuição seria muito apreciada. Muito obrigado.

    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.