Reputation: 1734
I have a custom View that I would like to "embed" in an WebView.
By embed I mean:
I wrote the custom View, so I can edit it as needed
Upvotes: 8
Views: 2955
Reputation: 12587
as I said in my comment.
I can't think of a normal way to what you do. What I would do if I were you is to put the custom view in between 2 WebView
objects like this:
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<WebView android:id="@+id/webView1
...
/>
<include android:layout="custom_layout" />
<WebView android:id="@+id/webView2
...
/>
</ ScrollView>
Upvotes: 0
Reputation: 23596
Take a RelativeLayout or FrameLayout as Parent. then Put WebView as First Child Layout and then your CustomView as second child view.
After this put some code to show and hide the CustomView on some specific Action.
It will surly help you.
Enjoy. :)
Upvotes: 1