title: Programmatically set TabLayout items titles
body: <p><a href="https://i.stack.imgur.com/nzBSP.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nzBSP.jpg" alt="enter image description here"></a></p>
  
  <p>I need to make this type of views so I thought a TabLayout with fragments would help.</p>
  
  <p>But the problem is, instead of having each menu item hardcoded, I need to make the tab titles programmatically as name may change or the amount of itemmenu also change. </p>
  
  <p>I think an ArrayList of Strings can help storing each item menu title. </p>
  
  <p>How can I have the titles set programmatically? </p>