相关疑难解决方法(0)

在Android上实现页面卷曲?

我在网上冲浪寻找一个很好的效果,在Android上翻页,似乎不是一个.由于我正在学习这个平台,能够做到这一点似乎是一件好事.

我设法在这里找到一个页面:http://wdnuon.blogspot.com/2010/05/implementing-ibooks-page-curling-using.html

- (void)deform
{
  Vertex2f  vi;   // Current input vertex
  Vertex3f  v1;   // First stage of the deformation
  Vertex3f *vo;   // Pointer to the finished vertex
CGFloat R, r, beta;
  for (ushort ii = 0; ii < numVertices_; ii++)
  {
    // Get the current input vertex.
    vi    = inputMesh_[ii];                       
    // Radius of the circle circumscribed by vertex (vi.x, vi.y) around A on the x-y plane
    R     = sqrt(vi.x * vi.x + pow(vi.y - A, 2)); 
    // …
Run Code Online (Sandbox Code Playgroud)

math android transition

40
推荐指数
2
解决办法
4万
查看次数

卷曲页面从左到右安卓

所以,我正在使用harism的页面卷曲,https://github.com/harism/android_page_curl并成功实现了它通过网络流加载图像.但是当我回到之前的图像或页面时,由于图像没有使用正确的索引,所以无法使其正常工作.即他们没有正确刷新.我无法弄清楚这一点.

这是我的实现,我将图像加载到 PageProvider

private class PageProvider implements CurlView.PageProvider {


        @Override
        public int getPageCount() {
            return data1.size()-1;
        } 

        private Bitmap loadBitmap(int width, int height, final int index) throws MalformedURLException, IOException {
            Bitmap b = Bitmap.createBitmap(width, height,Bitmap.Config.ARGB_8888);
            b.eraseColor(0xFFFFFFFF);
            Canvas c = new Canvas(b);

            System.out.println("value of current page index "+mCurlView.getCurrentIndex()+" and index is "+index);

            System.out.println("url forward");
            aq.ajax(data1.get(index+1), Bitmap.class,0, new AjaxCallback<Bitmap>() {

                @Override
                public void callback(String url, Bitmap object, AjaxStatus status) {
                    if(object!=null)
                           try {
                                System.out.println("url image downloaded "+url);
                                y=object;

                                aq.ajax(data1.get(index).replace(".png", ".mp3"), …
Run Code Online (Sandbox Code Playgroud)

android page-curl android-layout android-query

7
推荐指数
1
解决办法
2761
查看次数

使用OpenGL-ES在Android上进行页面卷曲动画

我想在Android中实现一个漂亮的3D页面卷曲动画.我读了一些文章,发现OpenGL-ES可以实现很好的效果,所以我开始学习OpenGL-ES(我做了一些OpenGL-ES的教程,我还在继续)但是我觉得实现这个目的太复杂了功能.此外,我得到了一些可在StackOverflow和网络上获得的示例,它们可以工作,但我无法理解它,有人可以指导我实现此功能吗?

android opengl-es

4
推荐指数
1
解决办法
2791
查看次数