当我使用scrollview for widget时,它不起作用.. 它说加载小部件就像问题一样.. 我不能在小部件上使用scrollview或者我使用滚动视图做错了吗? 这是我的代码..
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="3dp" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="sjfdiosjdfiosjdfoijsdfjisdjfosjdfiosjdfiosdjf
sdjf
jsdjfosijdfo
sjdf
jsd
fs
dfjsdfdfsdfsdfsd
iofjsjofdsd" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="sjfdiosjdfiosjdfoijsdfjisdjfosjdfiosjdfiosdjf
sdjf
jsdjfosijdfo
sjdf
jsd
fs
dfjsdfdfsdfsdfsd
iofjsjofdsd" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="sjfdiosjdfiosjdfoijsdfjisdjfosjdfiosjdfiosdjf
sdjf
jsdjfosijdfo
sjdf
jsd
fs
dfjsdfdfsdfsdfsd
iofjsjofdsd" />
</LinearLayout>
</ScrollView>
@Override
public void onReceive(Context context, Intent intent)
{
super.onReceive(context, intent);
RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.widget_layout_copy);
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);
ComponentName cpName = new ComponentName(context, EmateWidget.class);
appWidgetManager.updateAppWidget(cpName, remoteViews);
}