Controlling Tab colour-state / size in a TabActivity?

前端 未结 2 1825
春和景丽
春和景丽 2020-12-16 06:46

Ok, this is driving me nuts - I\'ve searched all of the references and examples I can find and I still seem to be missing something really obvious. These are the tabs for a

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-16 06:50

    Kindly update your question with the code you use.. Do you use xml inside your drawable for animating the tabs? here is a sample tabs action handling using xml.

    
    
        
        
        
        
    
    

    Customize tab behavior and icons using this xml file.

    Here is the code to set this animation/customizing options in tabs:

    intent = new Intent().setClass(this, sms.class);
    spec = tabHost.newTabSpec("sms").setIndicator("SMS",
           res.getDrawable(R.drawable.ic_tab_sms))
           .setContent(intent);
    tabHost.addTab(spec);
    

    Now the XML in layout to define tab-host and tab-widgets.

    
            
    
    

    Customise this xml layout with your own colors, fonts and structure.

提交回复
热议问题