请教:仿照HTC One的缩略图,Widget没有显示,如何处理?
缩略图的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 --------------------编程问答-------------------- 自己顶下,高手指教 --------------------编程问答-------------------- 咋没人呢?
补充:移动开发 , Android