rafaxplayer
07/08/15, 08:36:38
Buenas compañeros tengo un problemilla con unas animaciones...
Resulta que tengo dos texview en los cuales uso una animación para que aparezcan uno de izquierda a derecha y el otro viceversa.
Los anim son estos:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator">
<translate android:fromXDelta="-50%p"
android:toXDelta="0"
android:duration = "1000"/>
</set>
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator">
<translate android:fromXDelta="100%p"
android:toXDelta="0"
android:duration = "1000"/>
</set>
y el java que lo mueve este;
public class IntroActivity extends AppCompatActivity {
private TextView textIntro1;
private TextView textIntro2;
private TextView textIntro3;
private final int DURACION_SPLASH = 3000;
override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_intro);
textIntro1=(TextView)findViewById(R.id.textIntro1) ;
textIntro2=(TextView)findViewById(R.id.textIntro2) ;
textIntro3=(TextView)findViewById(R.id.textpro);
Animation t1= AnimationUtils.loadAnimation(this,R.anim.anim_dere cha);
Animation t2= AnimationUtils.loadAnimation(this,R.anim.anim_izqu ierda);
Animation t3= AnimationUtils.loadAnimation(this,R.anim.anim_fade out);
textIntro1.startAnimation(t1);
textIntro2.startAnimation(t2);
textIntro3.startAnimation(t3);
new Handler().postDelayed(new Runnable() {
public void run() {
Intent intent = new Intent(IntroActivity.this, Inicio_Activity.class);
startActivity(intent);
finish();
}
;
}, DURACION_SPLASH);
}
Bien el problema es que en una tablet las animaciones corren fluidas y sin ningún problema , y sin embargo en un móvil (un samsung Grand Prime) hacen un parón a medio recorrido , no entiendo el motivo de esto , sera por espacio? o que puede ser?
Vídeo con la animación:
PaNk5hwOAV8
Resulta que tengo dos texview en los cuales uso una animación para que aparezcan uno de izquierda a derecha y el otro viceversa.
Los anim son estos:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator">
<translate android:fromXDelta="-50%p"
android:toXDelta="0"
android:duration = "1000"/>
</set>
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator">
<translate android:fromXDelta="100%p"
android:toXDelta="0"
android:duration = "1000"/>
</set>
y el java que lo mueve este;
public class IntroActivity extends AppCompatActivity {
private TextView textIntro1;
private TextView textIntro2;
private TextView textIntro3;
private final int DURACION_SPLASH = 3000;
override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_intro);
textIntro1=(TextView)findViewById(R.id.textIntro1) ;
textIntro2=(TextView)findViewById(R.id.textIntro2) ;
textIntro3=(TextView)findViewById(R.id.textpro);
Animation t1= AnimationUtils.loadAnimation(this,R.anim.anim_dere cha);
Animation t2= AnimationUtils.loadAnimation(this,R.anim.anim_izqu ierda);
Animation t3= AnimationUtils.loadAnimation(this,R.anim.anim_fade out);
textIntro1.startAnimation(t1);
textIntro2.startAnimation(t2);
textIntro3.startAnimation(t3);
new Handler().postDelayed(new Runnable() {
public void run() {
Intent intent = new Intent(IntroActivity.this, Inicio_Activity.class);
startActivity(intent);
finish();
}
;
}, DURACION_SPLASH);
}
Bien el problema es que en una tablet las animaciones corren fluidas y sin ningún problema , y sin embargo en un móvil (un samsung Grand Prime) hacen un parón a medio recorrido , no entiendo el motivo de esto , sera por espacio? o que puede ser?
Vídeo con la animación:
PaNk5hwOAV8