折叠对话框布局android显示空屏幕

时间:2017-10-16 15:21:30

标签: android dialog folding

我已关注Ramotion/folding-cell-android进行折叠视图动画。

我实现了recycleler视图而不是list视图。我必须以对话框格式打开可折叠布局,但它无法正常工作。

我的xml文件:

     <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:minHeight="1000dp"
        android:minWidth="500dp"
        android:orientation="vertical">

        //this view is not visible in dialog
    <test.jinesh.customnavigation.Folding_Cell.FoldingCell
        xmlns:folding-cell="http://schemas.android.com/apk/res-auto"
        folding-cell:additionalFlipsCount="4"
        folding-cell:animationDuration="3000"
        folding-cell:backSideColor="#f4f0ff"
        folding-cell:cameraHeight="30"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/folding_cell"
       >
//this layout have to open in folding format
            <FrameLayout
                android:id="@+id/cell_content_view"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:visibility="gone">
                <include layout="@layout/folding_relative" />
                </FrameLayout>
                <FrameLayout
                android:id="@+id/cell_title_view"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <include layout="@layout/event_item" />
                </FrameLayout>
           </test.jinesh.customnavigation.Folding_Cell.FoldingCell>
    </LinearLayout>

对话窗口类:

  Dialog Foldingdialog = new Dialog(getActivity());
     Foldingdialog.setContentView(convertView);
     ImageView    closebutton=(ImageView) 
     Foldingdialog.findViewById(R.id.closebutton);
     FoldingCell  foldable = (FoldingCell) 
     Foldingdialog.findViewById(R.id.folding_cell);

    // on click show dialog
     Foldingdialog.show();
    foldable.toggle(false);

折叠cell class.java         Foldingcell

Output for my code

0 个答案:

没有答案