I have a code that creates tabs on the screen as needed, the problem is that when I create many tabs they will be "squeezed" on the screen and cut the rest on the tabs. I'm doing this all via Java, without using xml so I'm not able to make my scroll work, does anyone know how I can do this? Thank you in advance.
My short code:
My class inherits from a TabActivity I'm not using hs = new HorizontalScrollView(this);
on the first line within the code. I tried to use more did not work.
public void adicionaAbas(String texto) {
hs = new HorizontalScrollView(this);
TabHost th = getTabHost();
th.setBackgroundColor(Color.WHITE);
TabSpec ts = th.newTabSpec(texto);
// nome da aba
ts.setIndicator(texto);
th.addTab(ts);
setContentView(th);
}