我想在HoneyComb Tablet的底部设计Tab Bar。那么,是否有任何特定的方法或栏可用于设计底部标签栏的布局?
答案 0 :(得分:1)
只需在Android中使用默认的TabHosts并添加属性
即可 TabWidget 的 android:layout_alignParentBottom="true"
请参阅以下链接以获取更多信息
答案 1 :(得分:0)
绘制iphone类型标签栏
我通常在LinearLayout Horizontal中使用TextView和Background Gardients。
TextView具有可绘制的顶级属性,可以帮助包含图标。
我不建议使用默认标签布局
public void setFooterStyle(Context c,TextView profile,TextView parking,TextView taxi,TextView history,TextView help,int flag)
{
if(flag==0)
{
profile.setBackgroundResource(R.drawable.grey_background_gradient);
profile.setTextColor(Color.rgb(255, 255, 255));
profile.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.profile1, 0, 0);
}
else if(flag==1)
{
parking.setBackgroundResource(R.drawable.grey_background_gradient);
parking.setTextColor(Color.rgb(255, 255, 255));
}
else if(flag==2)
{
taxi.setBackgroundResource(R.drawable.grey_background_gradient);
taxi.setTextColor(Color.rgb(255, 255, 255));
taxi.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.taxi_on, 0, 0);
}
else if(flag==3)
{
history.setBackgroundResource(R.drawable.grey_background_gradient);
history.setTextColor(Color.rgb(255, 255, 255));
history.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.history_on, 0, 0);
}
在您的活动中
Global.getInstance().setFooterStyle(getApplicationContext(),(TextView) findViewById(R.id.btnprofile),(TextView)findViewById(R.id.btnparking),(TextView)findViewById(R.id.btntaxi),(TextView) findViewById(R.id.btnhistory),(TextView) findViewById(R.id.btnhelp), 4);