devfeng
V2EX  ›  Android

求 v 站大佬们帮助,困扰我一个周末了, viewpager in listview,调用 notifyDataSetChanged 崩溃

  •  
  •   devfeng · Dec 9, 2019 · 14060 views
    This topic created in 2355 days ago, the information mentioned may be changed or developed.

    报错:No view found for id xxx (viewpager) for fragment xxx

    7 replies    2019-12-11 16:14:04 +08:00
    mouyase
        1
    mouyase  
       Dec 9, 2019
    这边建议您按照字面意思先去排查一下呢
    Gehrman
        2
    Gehrman  
       Dec 9, 2019
    listview 里放 viewpager 是什么场景?
    HollowKnight
        3
    HollowKnight  
       Dec 9, 2019
    为何不用 RecyclerView+PagerSnapHelper??
    hikari
        4
    hikari  
       Dec 9, 2019
    @Gehrman #2 淘宝 京东首页那种就是 RecyclerView + ViewPager + RecyclerView
    fansangg
        5
    fansangg  
       Dec 10, 2019
    印象中 V7 包之后就在没用过 listview...现在我都忘记 listview 要怎么用了
    Gehrman
        6
    Gehrman  
       Dec 10, 2019
    没代码想象不出来问题;
    用 NestedScrollView 做容器,ViewPager,RecyclerView 之类的布局按需添加进去感觉可以
    daiisdai
        7
    daiisdai  
       Dec 11, 2019
    RecyclerView 做外部容器, 第一个 Item 嵌套一个横向 RecyclerView,使用 SnapHelper 实现 ViewPager 效果
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5385 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 01:28 · PVG 09:28 · LAX 18:28 · JFK 21:28
    ♥ Do have faith in what you're doing.