|
在manifest的activity節點使用
<activity android:windowSoftInputMode="adjustResize" . . . >
當點擊EditText控件彈出軟鍵盤的時候,系統會自動調整控件的位置。
代碼
http://github.com/shaobin0604/miscandroidapps/tree/master/WindowSoftInputMode/
參考
AppWidget的初始化有兩種方式:
目前遇到的問題是:
在Launcher里可以預先配置桌面顯示的AppWidget,如果AppWidget有Configure Activity,則系統在AppWidget的初始化過程不會發送android.appwidget.action.APPWIDGET_CONFIGURE Intent,而只是加載appwidget-provider里配置的initialLayout。這樣第二種就不可用,只能用第一種方法。
synchronized void
setTextSize(WebSettings.TextSize t)
Set the text size of the page.
void
setSupportZoom(boolean support)
Set whether the WebView supports zoom
void
setInitialScale(int scaleInPercent)
Set the initial scale for the WebView.
boolean
zoomIn()
Perform zoom in in the webview
boolean
zoomOut()
Perform zoom out in the webview
void
setBuiltInZoomControls(boolean enabled)
Sets whether the zoom mechanism built into WebView is used.
synchronized void
setJavaScriptEnabled(boolean flag)
Tell the WebView to enable javascript execution.