Здравствуйте! Пытаюсь следовать Вашим урокам. Сделал макетик с 4-мя TAB - вкладками На каждой вкладке свой Activity. В каждом Aktivity свой List. Все, в общем, работает: отображается и переключается между вкладками. Но меня смущает, что при загрузке приложения и при переключениях между вкладками в LogCat выдаются такие строки (приведено начало):
08-27 15:00:34.469: E/Trace(643): error opening trace file: No such file or directory (2)
08-27 15:00:35.439: I/Choreographer(643): Skipped 125 frames! The application may be doing too much work on its main thread.
08-27 15:00:35.480: D/gralloc_goldfish(643): Emulator without GPU emulation detected.
08-27 15:00:35.730: I/Choreographer(643): Skipped 55 frames! The application may be doing too much work on its main thread.
08-27 15:00:41.120: I/Choreographer(643): Skipped 49 frames! The application may be doing too much work on its main thread.
08-27 15:00:41.250: I/Choreographer(643): Skipped 37 frames! The application may be doing too much work on its main thread.
08-27 15:00:42.562: I/Choreographer(643): Skipped 43 frames! The application may be doing too much work on its main thread.
08-27 15:00:49.834: I/Choreographer(643): Skipped 44 frames! The application may be doing too much work on its main thread.
Я так понял, что вложить файлы я не могу
Поэтому прилагаю только это:
public class MainActivity extends TabActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// получаем TabHost
TabHost tabHost = getTabHost();
// инициализация была выполнена в getTabHost
// метод setup вызывать не нужно
TabHost.TabSpec tabSpec;
tabSpec = tabHost.newTabSpec("tag1");
tabSpec.setIndicator("Accounts");
tabSpec.setContent(new Intent(this, Acc.class));
tabHost.addTab(tabSpec);
tabSpec = tabHost.newTabSpec("tag2");
tabSpec.setIndicator("Operations");
tabSpec.setContent(new Intent(this, Oper.class));
tabHost.addTab(tabSpec);
tabSpec = tabHost.newTabSpec("tag3");
tabSpec.setIndicator("Budgets");
tabSpec.setContent(new Intent(this, Bud.class));
tabHost.addTab(tabSpec);
tabSpec = tabHost.newTabSpec("tag4");
tabSpec.setIndicator("Reports");
tabSpec.setContent(new Intent(this, Rep.class));
tabHost.addTab(tabSpec);
}
Спасибо за ответ.