gpt4 book ai didi

android - 我可以在 appWidget 中使用哪些 View ?

转载 作者:太空宇宙 更新时间:2023-11-03 12:13:52 26 4
gpt4 key购买 nike

谁能告诉我可以在 appWidget 中使用哪些 View ?

谢谢!

最佳答案

根据official android API :

RemoteViews 对象(以及因此的 App Widget)可以支持以下布局类:

  • FrameLayout
  • LinearLayout
  • RelativeLayout
  • GridLayout

And the following widget classes:

  • AnalogClock
  • Button
  • Chronometer
  • ImageButton
  • ImageView
  • ProgressBar
  • TextView
  • ViewFlipper
  • ListView
  • GridView
  • StackView
  • AdapterViewFlipper

Descendants of these classes are not supported.

RemoteViews also supports ViewStub, which is an invisible, zero-sized View you can use to lazily inflate layout resources at runtime.

同样以android 3.0开头支持下一个 View :

  • ListView - A view that shows items in a vertically scrolling list. For an example, see the Gmail app widget.
  • GridView - A view that shows items in two-dimensional scrolling grid. For an example, see the Bookmarks app widget.
  • StackView - A stacked card view (kind of like a rolodex), where the user can flick the front card up/down to see the previous/next card, respectively. Examples include the YouTube and Books app widgets.
  • AdapterViewFlipper - An adapter-backed simple ViewAnimator that animates between two or more views. Only one child is shown at a time.

关于android - 我可以在 appWidget 中使用哪些 View ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2037737/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com