How to set RecyclerView in android widget

前端 未结 2 1301
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-19 11:55

From : https://developer.android.com/training/material/lists-cards.html

I want to set RecyclerView in widget on home screen. Is it possible, and if it is, h

2条回答
  •  不思量自难忘°
    2021-02-19 12:21

    RecyclerView is not supported to be used as a RemoteView. See CreatingLayout

    A RemoteViews object (and, consequently, an App Widget) can support the following layout classes:

    FrameLayout
    LinearLayout
    RelativeLayout
    GridLayout

    And the following widget classes:
    AnalogClock
    Button Chronometer
    ImageButton
    ImageView
    ProgressBar
    TextView
    ViewFlipper
    ListView
    GridView
    StackView
    AdapterViewFlipper

提交回复
热议问题