用于在应用内打开手机转换设置的代码

时间:2014-02-13 04:18:18

标签: java android adt transitions

我有这个应用程序,当它导航到另一个活动时,它会执行过渡动画。现在我已经有了正常工作,但为了让它工作,我必须打开手机上的动画设置。我一直在谷歌上搜索,我似乎无法找到解决问题的方法。所以我的问题是这个,是否可以在应用程序中使用代码打开此设置,而不必手动执行此操作? 这是代码,但正如我上面所说这完美的工作,我正在使用Telstra下一个G华为手机,只是想不,如果我可以编码,所以我可以打开动画设置,如果我决定把它放在一个不同的电话。 //从开始重启的按钮:

    //Declaring the button for OnClickListener and EditText to send data:
            private void Restart() {
                Button Next = (Button)findViewById(R.id.restart3);
                Next.setOnClickListener(new View.OnClickListener() {

                    //The action the button takes when clicked:
                    @Override
                    public void onClick(View v) {

                        //Goes back to the start of app:
                        Intent i = new Intent(Height.this, Page_1.class);
                        //clears the stack of all Activities that were open before this one so that they don't stack up:
                        i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
                        startActivity(i);
                        //The transition animation when going onto next page:
                        overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);
                        // to end the current activity:
                        finish();
                    }
                });
            }

0 个答案:

没有答案