Question

Making a small library that extends a webview.

I have a method such that:

public static MyView create(final Activity a, final int type, final int location, final View v)

On a MyView, you call a .show() which just makes it visible, this it returns this.

So in an activity, you do this:

MyView.create(this, 0, 0, this.findViewById(android.R.id.content));

In the create, I want to add to the view given (v) and display on top of everything the new view. I can create the view fine. However, I can't position it correctly.

I've tried to follow other peoples steps, creating a RelativeLayout.LayoutParams and assigning it a rule that's ALIGN_PARENT_BOTTOM, but the view won't go to the bottom.

Any help would be appreciated.

Thanks!

Was it helpful?

Solution

try hosting the WebView and your custom view inside a FrameLayout, with the WebView as the background frame.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top