Fade in function not working in Eclipse

杀马特。学长 韩版系。学妹 提交于 2019-12-25 05:06:01

问题


I have set up the fade in functionality properly but its not working

MainActivity.java

setContentView(R.layout.activity_main);
    ImageView iv = (ImageView) findViewById(R.id.sname);
    final Animation animationFadeIn = AnimationUtils.loadAnimation(this, R.anim.fadein);
    iv.startAnimation(animationFadeIn);
    Thread timer = new Thread(){
        public void run(){
            try{
                sleep(4000);

            }catch(InterruptedException e)
            {
                e.printStackTrace();
            }finally{
                Intent in = new Intent(getApplicationContext(),HomescreenJ.class);
                startActivity(in);


            }

        }

    };
    timer.start();

fadein.xml

 <?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
  android:interpolator="@android:anim/linear_interpolator">
  <alpha
      android:fromAlpha="0.1"
      android:toAlpha="1.0"
      android:duration="2000"
      />
</set>

Kindly its basically my splash screen. On which i want one image to be stationary and other one to be displayed with Fade-in effect.

来源:https://stackoverflow.com/questions/42792275/fade-in-function-not-working-in-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!