Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/179.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 翻译动画不起作用_Android - Fatal编程技术网

Android 翻译动画不起作用

Android 翻译动画不起作用,android,Android,我已为布局中的项目翻译动画。当第一个项目有动画结束开始第二个项目和其他。它在索尼爱立信Xperia Arc S LT18i上不起作用,我也不知道为什么。 这是我的密码 public class LoginActivity extends FragmentActivity { private static final String TAG = LoginActivity.class.getSimpleName(); private EditText mUsername; private Edi

我已为布局中的项目翻译动画。当第一个项目有动画结束开始第二个项目和其他。它在索尼爱立信Xperia Arc S LT18i上不起作用,我也不知道为什么。 这是我的密码

public class LoginActivity extends FragmentActivity {

private static final String TAG = LoginActivity.class.getSimpleName();

private EditText mUsername;
private EditText mPassword;
private CheckBox mSaveUserNameCheckbox;
private View contentHolder;
private ImageView logoImage;
private LinearLayout logLay, passLay, rememberLay, buttonLay;
private String key_link = "";

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);

    Uri data = getIntent().getData();
    Log.i("URI issue", "uri="+data);
    if (data != null) {
        String scheme = data.getScheme(); 
        List<String> params = data.getPathSegments();
        if (params.get(0) != null && params.get(1) != null) {
            Log.i("PARSING", "data=" + data + " shame=" + scheme + " host="
                    + data.getHost() + " ::: param 0=" + params.get(0)
                    + "   param 1=" + params.get(1));

            if (scheme.equalsIgnoreCase("https")) {
                String host = data.getHost();
                if (host.equalsIgnoreCase("jira.hiqo-solutions.us")) {
                    if (params.get(0).equalsIgnoreCase("browse"))
                        key_link = params.get(1);
                } else {
                    Toast.makeText(this, "Incorrect link!",
                            Toast.LENGTH_LONG).show();
                }
            }
        }
    }

    contentHolder = findViewById(R.id.content_holder);
    logoImage = (ImageView) findViewById(R.id.imageLogo);
    logoImage.setVisibility(View.GONE);

    logLay = (LinearLayout) findViewById(R.id.usernameLay);
    logLay.setVisibility(View.GONE);
    passLay = (LinearLayout) findViewById(R.id.passLay);
    passLay.setVisibility(View.GONE);
    rememberLay = (LinearLayout) findViewById(R.id.rememberLay);
    rememberLay.setVisibility(View.GONE);
    buttonLay = (LinearLayout) findViewById(R.id.buttonLay);
    buttonLay.setVisibility(View.GONE);

    contentHolder.setVisibility(View.GONE);

    if (CredentialsPrefs.mRememberMe.get() && checkConnection()) {
        setMode();
        doLogin(CredentialsPrefs.mLogin.get(),
                CredentialsPrefs.mPassword.get());
    } else {
        if (!checkConnection()) {
            Toast.makeText(this, "No Internet Connections!",
                    Toast.LENGTH_LONG).show();
        }
        contentHolder.setVisibility(View.VISIBLE);
        CredentialsPrefs.mLogined.put(false);
        final Animation logoAnim = AnimationUtils.loadAnimation(this,
                R.anim.logo_animation);
        final Animation loginAnim = AnimationUtils.loadAnimation(this,
                R.anim.items_animation);
        final Animation passAnim = AnimationUtils.loadAnimation(this,
                R.anim.items_animation);
        final Animation rememberAnim = AnimationUtils.loadAnimation(this,
                R.anim.items_animation);
        final Animation buttonAnim = AnimationUtils.loadAnimation(this,
                R.anim.items_animation);
        loginAnim.setAnimationListener(new AnimationListener() {

            @Override
            public void onAnimationStart(Animation animation) {

            }

            @Override
            public void onAnimationRepeat(Animation animation) {

            }

            @Override
            public void onAnimationEnd(Animation animation) {
                passLay.setVisibility(View.VISIBLE);
                passLay.startAnimation(passAnim);
            }
        });
        passAnim.setAnimationListener(new AnimationListener() {

            @Override
            public void onAnimationStart(Animation animation) {

            }

            @Override
            public void onAnimationRepeat(Animation animation) {

            }

            @Override
            public void onAnimationEnd(Animation animation) {
                rememberLay.setVisibility(View.VISIBLE);
                rememberLay.startAnimation(rememberAnim);
            }
        });
        rememberAnim.setAnimationListener(new AnimationListener() {

            @Override
            public void onAnimationStart(Animation animation) {
                buttonLay.setVisibility(View.VISIBLE);
                buttonLay.startAnimation(buttonAnim);
            }

            @Override
            public void onAnimationRepeat(Animation animation) {

            }

            @Override
            public void onAnimationEnd(Animation animation) {

            }
        });
        buttonAnim.setAnimationListener(new AnimationListener() {

            @Override
            public void onAnimationStart(Animation animation) {
            }

            @Override
            public void onAnimationRepeat(Animation animation) {

            }

            @Override
            public void onAnimationEnd(Animation animation) {
                initializateControls();

            }
        });

        logoAnim.setAnimationListener(new AnimationListener() {

            @Override
            public void onAnimationStart(Animation animation) {

            }

            @Override
            public void onAnimationRepeat(Animation animation) {

            }

            @Override
            public void onAnimationEnd(Animation animation) {
                logLay.setVisibility(View.VISIBLE);
                logLay.startAnimation(loginAnim);
            }
        });
        logoImage.setVisibility(View.VISIBLE);
        logoImage.startAnimation(logoAnim);

    }

它可以是什么?

htc one ace2 gs4 nexus上的动画看起来都很好,当你说它不工作时,到底发生了什么?没有什么还是不正确的动画?另外,试着把你评论中的代码放到你的问题中,这样更容易阅读。第一个徽标图像有很好的动画,然后所有动画都不起作用。动画结束后,所有项目都必须可见,但在索尼爱立信上,只有第一个徽标图像可见