如何创建中央凸起的标签栏? [英] How to create center raised tabbar?

查看:113
本文介绍了如何创建中央凸起的标签栏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要像下面的图像一样创建TabBar:

I want to create the TabBar as like Below image:

在这里,所有选项卡栏都是正常的.只是他们是定制的.现在,我想像上面的图像一样创建选项卡栏.中间的Tab凸起在其中.

Here, all tab bar are normal. Just they are custom made. Now i want to create the Tab Bar as like above image. In which the center Tab is raised.

那我应该怎么做才能使它成为可能?

So what should i have do to make it possible ?

如果有任何演示,那会很好.

If is there any demo then it will be good.

请帮助我.

推荐答案

您可以在标签"小部件中将背景图片"设置为

you can set the Background image in Tab widget as

tabHost.getTabWidget().getChildAt(0).setBackgroundResource(R.drawable.home_h);
tabHost.getTabWidget().getChildAt(1).setBackgroundResource(R.drawable.live);
tabHost.getTabWidget().getChildAt(2).setBackgroundResource(R.drawable.camera);
tabHost.getTabWidget().getChildAt(3).setBackgroundResource(R.drawable.profile);
tabHost.getTabWidget().getChildAt(4).setBackgroundResource(R.drawable.Messege);

将图像创建为其他四个图像,例如将它们的前20%"设置为透明",并将中间相机创建为您的曲线基础".这样您将实现您的目标.

create the image as other four like Their Top 20% as Transparent and middle camera create as your Curve base . you will achieve your goal as this.

就像这样,其中灰色部分是透明部分.

Like this where grey part is Transparency part.

这篇关于如何创建中央凸起的标签栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆