search

Home  >  Q&A  >  body text

Android 这样的AppWidget如何实现?

想设计个类似凤凰新闻的AppWidget,这种效果该怎么做?

这有两个相同的item,该怎么实现复用?还是在一个layout文件中写死,使用ReomteViews去调用?

阿神阿神2867 days ago432

reply all(2)I'll reply

  • 高洛峰

    高洛峰2017-04-17 17:49:10

    1. Create a new View class, which inherits from LinearLayout, and contains an ImageView and a TextView (attributes can be customized as needed), and you can reuse them.

    2. Use RecycleView as container and inherit ViewHolder.

    reply
    0
  • 迷茫

    迷茫2017-04-17 17:49:10

    Well learn about viewholder

    reply
    0
  • Cancelreply