RadioGroup implements ios-like segmented selection (UISegmentedControl) controls

In ios7, there is a flat style control called the segmented selection control UISegmentedControl. The control is divided into a row, and there are several buttons separated by simple lines. Each click can only select one of the buttons. It is similar to tabbar but There is a slight difference. The new version of the QQ mobile client uses this control.

However, there is no ready-made control available in android, but there is a RadioGroup control in android with similar functions but a very different UI. The same purpose can be achieved by defining the appearance of the RadioGroup. In fact, there is no TabBar in android, but many apps implement the UITabBar effect in ios by modifying RadioGroup. It seems that RadioGroup is a really useful control, although the native one is really ugly.

It may be difficult for beginners to customize RadioGroup. There is a ready-made packaged library and examples on git, which can be downloaded and learned. If you are developing a project with eclipse, you may need to change it before you can use it, because it provides is the project structure of android studio.

Project address: https://github.com/hoang8f/android-segmented-control

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327072109&siteId=291194637