Eros Live
Find the Way
posts - 15,comments - 0,trackbacks - 0

在manifest的activity节点使用

<activity android:windowSoftInputMode="adjustResize" . . . >

当点击EditText控件弹出软键盘的时候,系统会自动调整控件的位置。

代码

http://github.com/shaobin0604/miscandroidapps/tree/master/WindowSoftInputMode/

参考

posted @ 2010-08-25 18:42 Eros 阅读(255) | 评论 (0)编辑 收藏

AppWidget的初始化有两种方式:

  1. 没有提供Configure Activity, 则在 AppWidgetProvider#onUpdate 里初始化。
  2. 提供Configure Activity, 则在 Configure Activity 里初始化。

目前遇到的问题是:

在Launcher里可以预先配置桌面显示的AppWidget,如果AppWidget有Configure Activity,则系统在AppWidget的初始化过程不会发送android.appwidget.action.APPWIDGET_CONFIGURE Intent,而只是加载appwidget-provider里配置的initialLayout。这样第二种就不可用,只能用第一种方法。

posted @ 2010-08-24 11:11 Eros 阅读(422) | 评论 (0)编辑 收藏