android中的段控制

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20538421/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 03:00:02  来源:igfitidea点击:

Segment control in android

android

提问by Bhavit S. Sengar

Can any one please tell me how to make a segment control in android, exactly given below -

任何人都可以告诉我如何在android中制作段控件,具体如下 -

enter image description here

enter image description here

I am confused what images should I use . How to cut images and use them as resources to get exact same segment control like this. And which library would be perfect to achieve this ?

我很困惑我应该使用什么图像。如何剪切图像并将它们用作资源以获得与此完全相同的段控制。哪个图书馆最适合实现这一目标?

回答by Digital Alchemist

There are dozen of good articles on segment control implementation... but following are the good ones , that helped me.. Intermediate Exampleis closest to your requirement.

有很多关于段控制实现的好文章……但以下是对我有帮助的好文章……中间示例最接近您的要求。

Basic Example

基本示例

Intermediate Example

中级示例

Github Segment Control Example One

Github 段控制示例一

Github Segment Control Example Two

Github 段控制示例二

Github Ceryle SegmentedButton (the richest)

Github Ceryle SegmentedButton(最富有的)

For creating Menus , u need to have some photoshop skills, although this website can create navigation for u onlineas well Create Navigation Online

对于创建菜单,你需要有一些Photoshop技能,虽然这个网站可以为你创建在线导航以及 在线创建导航