使用布局上的按钮-页面卷曲Harism-Android

使用布局上的按钮-页面卷曲Harism-Android,android,image,android-layout,bitmap,android-canvas,Android,Image,Android Layout,Bitmap,Android Canvas,我正在我的应用程序中使用Harism提供的很棒的库来实现页面卷曲效果。你可以在github上找到它。我在curl页面上使用布局而不是图像。但布局按钮不可单击。那么,如何在curl页面上使用可点击按钮进行布局呢 这是我的布局而不是图像代码: private int[] mBitmapIds = { R.layout.layout_1, R.layout.layout_2, R.layout.layout_3, R.layout.layout_4, R.layout.layout_5};

我正在我的应用程序中使用Harism提供的很棒的库来实现页面卷曲效果。你可以在github上找到它。我在curl页面上使用布局而不是图像。但布局按钮不可单击。那么,如何在curl页面上使用可点击按钮进行布局呢

这是我的布局而不是图像代码:

private int[] mBitmapIds = { R.layout.layout_1, R.layout.layout_2, R.layout.layout_3, R.layout.layout_4, R.layout.layout_5};

    @Override
    public int getPageCount() {
        return 5;
    }

    private Bitmap loadBitmap(int width, int height, int index) {
        LayoutInflater inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);

        View v = inflater.inflate(mBitmapIds[index],null);
        v.measure(View.MeasureSpec.makeMeasureSpec(width, View.MeasureSpec.EXACTLY),View.MeasureSpec.makeMeasureSpec(height, View.MeasureSpec.EXACTLY));
        v.layout(0, 0, v.getMeasuredWidth(), v.getMeasuredHeight());
        Bitmap b = Bitmap.createBitmap(v.getWidth(), v.getHeight(),Bitmap.Config.ARGB_8888);
        Canvas c = new Canvas(b);
        v.draw(c);
        return b;
    }
我是初学者,如果我有任何错误,请原谅。

提前谢谢

嘿,你找到办法了吗?因为它是位图,所以不能点击,我们需要在页面完全卷曲或加载后进行回调,然后将位图更改回布局。我们可以再次将位图更改回布局吗