Align-Center SlidingTabLayout

后端 未结 3 1957
臣服心动
臣服心动 2020-12-17 02:08

After I moved my app to 5.0, I had to move from the basic tabs to the slidingTabLayout that a google developer provides .

The problem is, I can\'t figure out how to

3条回答
  •  天涯浪人
    2020-12-17 02:47

    in class SlidingTabLayout method populateTabStrip() add

    LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
            0, LayoutParams.WRAP_CONTENT, 1f);
    tabView.setLayoutParams(lp);
    

提交回复
热议问题