【问题标题】:Android XML properties: match_parent + 50pixelsAndroid XML 属性:match_parent + 50pixels
【发布时间】:2017-05-06 18:31:48
【问题描述】:

我需要在我的应用中显示一个网站,但我不想向我的用户显示其页脚,它应该在 50 像素左右,我无法控制页脚,它是我的网站(无罪)。

我可以在上面重叠一个按钮,但是有没有办法显示 一个与父级匹配的 webview 加上一个应该不显示的额外 50 像素。

网页内容会不时改变。

提前感谢您的帮助和支持。

【问题讨论】:

  • 你能把xml放在这里吗
  • 为什么不以编程方式解析网站内容并删除页脚?
  • #Nishith,我没那么好。
  • @SuryaPrakashKushawah 我刚刚有了一个想法,没有进行,想从有经验的玩家那里了解任何解决方法。谢谢
  • 不可能。您需要更改布局层次结构,使其比前父视图扩展 50 像素。

标签: android webview web


【解决方案1】:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<WebView android:id="@+id/webView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

<Button
    android:id="@+id/buttonUrl"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    style="?attr/borderlessButtonStyle"
    android:background="@android:color/white"
    android:text="XXX" />

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-08-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多