简体   繁体   English

如何在Android中创建弯曲的布局

[英]How to create a curvey layout in android

I need a suggestion to implement the following bar as seen in the picture below. 我需要一个建议来实现下面的栏,如下图所示。 I am lost in which layout manager should i use 我迷路了应该使用哪个布局管理器

My desginer has given me the bar background and all the buttons seperately . 我的设计者分别为我提供了酒吧背景和所有按钮。 I know that I have to use framelayout to put the buttons on top of the bar , but I am lost as to how to position those buttons precisely in the curve. 我知道我必须使用framelayout将按钮放在条形图的顶部,但是我不知道如何将这些按钮精确地放置在曲线上。

Any hits ? 有点击吗? 在此处输入图片说明

One of the ways can be the following: 其中一种方法可以是以下几种:

For getting the curve, leave the upper frame layout as it is. 为了获得曲线,请保持上部框架的布局不变。 Concentrate of the tabs. 集中选项卡。 For the individual tabs you can precisely create the drawables in a way that a portion(curvy) of there background is transparent. 对于各个选项卡,您可以精确地创建可绘制对象,使其中背景的一部分(曲线)透明。 You might have to be precise is while making that small curvy portion as transparent. 您可能必须要精确,是使那小小的弯曲部分透明。 That's my 2 cents for your problem. 那是我给你的问题2美分。

与上面类似,您可以简单地将背景创建为普通线性布局内部的弯曲图像,并相应地放置按钮的可绘制对象。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM