search

Home  >  Q&A  >  body text

布局 - android 微信切换栏

想请问一下怎么实现Android类似微信那种切换界面,只要求个思路

就是下面几个图标,然后点不同的图标仿佛只有图标栏上方改变了,图标栏一直保持不变

ringa_leeringa_lee2771 days ago664

reply all(5)I'll reply

  • 迷茫

    迷茫2017-04-18 09:15:34

    The official document has an introduction, which can be easily implemented:
    https://developer.android.goo...

    You can also write it yourself

    <LinearLayout>
      <TitleView></TitleView>
      <ContentView></ContentView>
      <TabView></TabView>
    </LinearLayout>

    When switching between tabs, just modify the Title.

    It turns out that Guo Lin has shared that you can refer to the actual application of Android ActionBar and the design of the high imitation WeChat main interface.

    reply
    0
  • PHPz

    PHPz2017-04-18 09:15:34

    Search the bottom navigation bar and find various implementation methods online. Or you can use Bottom Navigation that comes with Android. A similar effect will occur.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 09:15:34

    I just analyzed the UI of WeChat:

    You can see that the UI of WeChat is divided into two layers as a whole. The upper layer only has the title (attached to the top), and the lower layer is a linear layout with a com.tencent.mm.ui.mogic.WxViewPager也就是微信自定义的Viewpager and a bottom indicator. The layout is very simple, in other words , WeChat UI has always been simple to crude...

    reply
    0
  • PHPz

    PHPz2017-04-18 09:15:34

    You can read this article https://segmentfault.com/a/11...

    reply
    0
  • 高洛峰

    高洛峰2017-04-18 09:15:34

    A typical similar implementation is TabLayout + ViewPager

    reply
    0
  • Cancelreply