How to get String Resource within ViewPager Adapter?

后端 未结 9 1882
孤城傲影
孤城傲影 2020-12-31 07:42

I trying to set the title for my viewpager, I can\'t seem to get it to work. I tried Resources.getSystem().getString(R.string.title1); and also tried to pass a context. Coul

9条回答
  •  轮回少年
    2020-12-31 08:23

    In my experience, the view pager won't show each text to the assigned screen consistently. I needed to create separate layout for each page and assign the text from within the layout, so when flipping the pages each page will show a layout with its text.

提交回复
热议问题