Can I set viewpager's item width?

前端 未结 2 1712
礼貌的吻别
礼貌的吻别 2021-01-03 03:06

I hope I can show 3 items in a page of viewpager, but now I only could set viewpager\'s padding value and margin value, so it only show one item in a page of viewpager. How

2条回答
  •  萌比男神i
    2021-01-03 03:52

    Have you tried setting the page margins to a negative value, see setPageMargin(int)? If I remember correctly, I read someone realizing something similar to what you're describing that way.

    Alternatively, you could have a look at using a Gallery in stead, although I have to admit I'm not a big fan of them as they seem to be less flexible and more buggy.

提交回复
热议问题