我正在开发android选项卡应用程序,我想用实际的方式更改标签栏内容,在我的标签栏中有ImageView
和TextView
我需要更改{{1}图片和Imageview
文字。
TextView
这段代码也不起作用..!
答案 0 :(得分:0)
您可以使用以下代码进行更改
TextView title = (TextView )tabGroup.getChildAt(0).findViewById(R.id.tv);
title.setText("Your text");
答案 1 :(得分:0)
ImageView tabImage = (ImageView )tabHost.getTabWidget().getChildAt(1).findViewById(R.id.ordericon);
TextView tabText = (TextView )tabHost.getTabWidget().getChildAt(1).findViewById(R.id.orders_label);