来源: https://developer.android.com/training/material/lists-cards.html
我想在主屏幕上的小部件中设置RecyclerView
,是否可能?如果可能,应该如何做?请提供一些示例。
来源: https://developer.android.com/training/material/lists-cards.html
我想在主屏幕上的小部件中设置RecyclerView
,是否可能?如果可能,应该如何做?请提供一些示例。
RecyclerView不支持用作RemoteView。详情请参见CreatingLayout
RemoteViews对象(以及其关联的应用小部件)只支持以下布局类别:
FrameLayout
LinearLayout
RelativeLayout
GridLayout以及以下小部件类别:
AnalogClock
Button Chronometer
ImageButton
ImageView
ProgressBar
TextView
ViewFlipper
ListView
GridView
StackView
AdapterViewFlipper
RecyclerView
目前不支持应用小部件。