我已将按钮添加到我的WebView。但我无法让它与屏幕底部对齐。我已经给出了下面的代码。如何将按钮对齐到屏幕底部
Button button = new Button(context);
button.setText("Button");
LayoutParams params1 = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
params1.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
button.setLayoutParams(params1);
webView.addView(button);
有谁知道如何做到这一点。
你有没有尝试过重力底? – Pull
@Pull我没有在任何地方找到该选项 – glo
我可以知道你是不是试图将该按钮放置在webview下面吗? y在webview中? – anand