Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding parent layout to one child view error #15

Open
sakaravinth opened this issue Aug 23, 2018 · 0 comments
Open

Adding parent layout to one child view error #15

sakaravinth opened this issue Aug 23, 2018 · 0 comments

Comments

@sakaravinth
Copy link

Hi ,
Thanks for library. I am using tableview and mapview as child inside split pane layout .
I want to implement horizontal scrollview for tableview .If i add horizontal scrollview as parent to table view following error occuring in split pane layout. I have tried put a layout for horizontal scrollview with table view as one child and map view as another child,but same error is coming.

Sample code

<com.mobidevelop.spl.widget.SplitPaneLayout
android:id="@+id/layout_map_track"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/appBar_reprt_map"
android:visibility="visible">

    <HorizontalScrollView
        android:layout_width="wrap_content"
        android:layout_below="@+id/toolbar"
        android:layout_height="wrap_content">
    <de.codecrafters.tableview.SortableTableView
        android:id="@+id/tableView_map"
        android:layout_width="800dp"
        android:layout_height="match_parent"
        android:scrollbars="horizontal"

        />
    </HorizontalScrollView>
    <fragment
        android:id="@+id/map"
        class="com.google.android.gms.maps.SupportMapFragment"

        android:layout_width="match_parent"
        android:layout_height="match_parent" />
</com.mobidevelop.spl.widget.SplitPaneLayout>

Error
java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams cannot be cast to android.widget.FrameLayout$LayoutParams
at android.widget.FrameLayout.onMeasure(FrameLayout.java:224)
at android.widget.HorizontalScrollView.onMeasure(HorizontalScrollView.java:315)
at android.view.View.measure(View.java:19169)
at com.mobidevelop.spl.widget.SplitPaneLayout.onMeasure(SplitPaneLayout.java:160)
at android.view.View.measure(View.java:19169)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant