我正在嘗試Android Studio中的東西。它進展得很好,但只是我陷入了一件事。我如何讓WebView活動使用全屏尺寸? http://i.stack.imgur.com/oYJoP.pngAndroid Studio - WebView全尺寸
2
A
回答
0
requestWindowFeature(Window.FEATURE_NO_TITLE);
在活動onCreate方法
0
使用下面的代碼的setContentView
setContentView(R.layout.yourlayout);
之前。這個工作對我來說
<WebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="match_parent">
</WebView>
如果您正在使用WebView
在另一個佈局如LinearLayout
不至佈局給填充...
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<WebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="match_parent">
</WebView>
</LinearLayout>
如果你想隱藏ActionBar
太然後跳轉到你清單文件和您的活動標記使用android:theme="@style/Theme.AppCompat.Light.NoActionBar"
<activity
android:name=".YourActivityName"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
相關問題
- 1. WebView Android試圖獲得全尺寸
- 2. Android Studio多屏幕尺寸
- 3. 尺寸圖像以適合WebView尺寸
- 4. Android WebView - 請參閱全尺寸的頁面(如pc)
- 5. Android如何使用webview顯示全尺寸的巨大圖像
- 6. 全尺寸AmCharts
- 7. 全尺寸
- 8. 全屏尺寸
- 9. 更改屏幕尺寸的按鈕尺寸Android Studio
- 10. android studio預覽尺寸與實際尺寸不一樣
- 11. 全尺寸Silverlight應用尺寸
- 12. Android Studio:減小字體尺寸
- 13. webview中的直接圖像鏈接顯示全部尺寸
- 14. 在Facebook上使用全尺寸在全尺寸上照片使用GRAPH API Android
- 15. Swing全尺寸JPanel
- 16. textarea至全尺寸
- 17. Android EditText佈局寬度全尺寸
- 18. Android:不能讓ListView的全尺寸
- 19. Android:按鈕上的全尺寸文本
- 20. Android圖片不顯示全尺寸
- 21. Android Widget尺寸
- 22. Android ViewPager尺寸
- 23. c#Windows Phone 8.1 HTML尺寸小於WebView尺寸
- 24. android多種屏幕尺寸
- 25. Android屏幕尺寸
- 26. Android Bitmap降尺寸
- 27. Android屏幕尺寸
- 28. 離子全尺寸背景
- 29. colorbox全尺寸圖像
- 30. get_post_gallery全尺寸圖像
我在哪裏可以找到setContentView? (是的,我是新手,不需要告訴我;)) – andreglud 2014-10-16 12:56:53