缩略图的xml文件screens_editor.xml采用RelativeLayout,通过mDragLayer.addView(mScreensEditor);显示出来了。mScreensEditor=(ViewGroup)mInflater.inflate(R.layout.screens_editor, null);
mDragLayer.addView(mScreensEditor);//源码提供DragLayer extends FrameLayout
但widget缩略图采用下面方法(PagedViewGridLayout(launcher源码提供的),widget类始终没有显示,请指教。for (int j = 0; j < mAppsCustomizeContent.NumOfWidgetPages(); ++j) {
PagedViewGridLayout layout = new PagedViewGridLayout(getApplicationContext(), mAppsCustomizeContent.getWidgetCountX(),mAppsCustomizeContent.getWidgetCountY());
mAppsCustomizeContent.setupPage(layout);
mScreensEditor.addView(layout, new PagedViewGridLayout.LayoutParams(480,540));
}
mAppsCustomizeContent.invalidatePageData(mAppsCustomizeContent.NumOfWidgetPages(), true);
mDragLayer.addView(mScreensEditor);
htc缩略图addview
mDragLayer.addView(mScreensEditor);//源码提供DragLayer extends FrameLayout
但widget缩略图采用下面方法(PagedViewGridLayout(launcher源码提供的),widget类始终没有显示,请指教。for (int j = 0; j < mAppsCustomizeContent.NumOfWidgetPages(); ++j) {
PagedViewGridLayout layout = new PagedViewGridLayout(getApplicationContext(), mAppsCustomizeContent.getWidgetCountX(),mAppsCustomizeContent.getWidgetCountY());
mAppsCustomizeContent.setupPage(layout);
mScreensEditor.addView(layout, new PagedViewGridLayout.LayoutParams(480,540));
}
mAppsCustomizeContent.invalidatePageData(mAppsCustomizeContent.NumOfWidgetPages(), true);
mDragLayer.addView(mScreensEditor);
htc缩略图addview
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货