我们怎样才能显示卷页动画的点击在Android上的按钮的按钮、动画、Android

2023-09-04 08:34:20 作者:你可以滚了!

我用我的应用程序的页面卷曲动画。

I am using the Page curl animation in my application.

code可以在这里找到:https://github.com/harism/android_page_curl/.

Code can be found here: https://github.com/harism/android_page_curl/.

这code为工作正常,但我想提出一些修改它。

That code is working fine but i want to make some Modifications in it.

1.To没有背景显示全屏幕上的图像。

1.To display the image on full screen with no background.

2。我想显示对点击的按钮也是这个卷曲动画。

2.I want to show this curl animation on click of the button also.

在code的邮件CurlActvity类 http://pastebin.com/ZLzP6Zxt 在那里。

The code for the mail CurlActvity class is http://pastebin.com/ZLzP6Zxt at there.

如果任何人有什么地方我必须做出改变code一些想法,请您帮助我。任何帮助是AP preciated。

If anyone have some Idea about where i have to made changes the code then please help me. Any help is appreciated.

编辑: 首届问题在全屏幕上显示的图像没有背景是由一些修改的解决私有类SizeChangedObserver 。唯一的问题是设置按钮动画的onClick。

The 1st problem To display the image on full screen with no background is solved by some modifications in the private class SizeChangedObserver . The only issue is to set the animation onClick of the button.

推荐答案

有关全屏显示,你必须使用像

For the full screen display you have to use like that

private class SizeChangedObserver implements CurlView.SizeChangedObserver {
        public void onSizeChanged(int w, int h) {
            if (w > h) {
                mCurlView.setViewMode(CurlView.SHOW_TWO_PAGES);
                mCurlView.setMargins(0f, 0f, 0f, 0f);
            } else {
                mCurlView.setViewMode(CurlView.SHOW_ONE_PAGE);
                mCurlView.setMargins(0f, 0f, 0f, 0f);
            }
        }
    }

}

此外,以显示动画看到链接页面卷曲动画 - 问题