我在做项目的时候发现webview显示一个html文件的时候,右边总是有一个白色的边框,不太好看,我试了一下好像对我这样水平的还很麻烦,所以来这里请教高手,有什么方法可以吧这个边框去掉。拜托。
解决方案 »
- android 为什么我的OnClickListener 继承的 方法是public void onClick(DialogInterface dialog,
- 联系人自定义字段更新问题
- 如何查找一个Android控件具有哪些XML属性呢
- 怎么修改系统的系统时间?就是每次刷机的时候系统的默认时间就是2011.01.01
- 新建空的android应用工程报错R cannot be resolved to a variable
- android软件防盗版的一个办法可行否
- android 网络访问(高版本的报错)
- 40岁的老人学习android开发,用android studio 怎么sdk、avd等管理器启动不了。
- android 一个问题
- 急急急! Android Studio 怎么样更新SDK
- Android 代码混淆问题
- 美图秀秀和魔图精灵中菜单栏的实现
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<WebView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
</merge>
或者能传白条的图上来么?
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
/>
应该定义个weight
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
/>
这次应该可以看到了。
这次应该可以看到了。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent"> <EditText android:id="@+id/EditText01" android:layout_height="wrap_content"
android:text="http://www.baidu.com" android:layout_width="fill_parent"></EditText> <Button android:text="Go" android:id="@+id/Button01"
android:layout_width="wrap_content" android:layout_height="wrap_content"></Button> <ProgressBar android:id="@+id/ProgressBar01"
android:layout_height="wrap_content" android:layout_width="fill_parent"
style="?android:attr/progressBarStyleHorizontal">
</ProgressBar> <TextView android:id="@+id/TextView01" android:layout_height="wrap_content"
android:layout_width="fill_parent" android:text="TextView01"></TextView> <WebView android:id="@+id/webview" android:layout_width="fill_parent"
android:layout_height="fill_parent" /></LinearLayout>没有发现边框
要把滚动条的style设置一下就行了。
在onCreate里给webView添加一条:
webView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);