1

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!

4

1 回答 1

1

尝试在 FrameLayout 中托管 WebView 和您的自定义视图,并将 WebView 作为背景框架。

于 2013-10-05T19:17:41.640 回答