如何使用remotevies添加图库视图

时间:2012-03-24 13:45:40

标签: android

我正在制作Android小部件 RemoteViews包含包含LinearLayout的布局 我想在线性布局中添加Galleryview:

public class IEGallery extends Gallery {
    public StoryLoader storyListRequest;    
    private ArrayList<Story> storyLists;
    private ImageAdapter storyAdapter;
    private IEGallery _instance;
    Context mcontext;   
    public IEGallery(Context context, String url) {
        super(context);
        IELog.i("IndianExpress","IEGallery : constructor :: start");
        _instance=this;
}

此类返回图库视图。我想在我的remoteviews中添加此图库视图。这包含线性布局。我已编写此代码但在此处输出问题。

RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget);
IEGallery iegallery =new IEGallery();
views.addView(R.id.llwidgetlist, iegallery);

1 个答案:

答案 0 :(得分:0)

  

我想在线性布局中添加Galleryview。

Android不支持。 RemoteViews不支持GalleryRemoteViews不支持任何View的任何自定义子类。