0

我想为我的 Android 应用程序生成以下内容。

在此处输入图像描述

我尝试RelativeLayout使用 XML 创建的一些可绘制对象(空圆圈、实心圆圈、虚线)来实现这一点,但我什至没有接近它。它是用布局生成此类视图的正确方法吗?如果是这样,是RelativeLayout要走的路吗?或者我应该为此创建一个自定义视图?

4

1 回答 1

0

why are there 4 dots between the last item and the one before it, while the other have 3 dots?

anyway, i think you can achieve those results by having a listView with custom items.

each item would be shown as a relativeLayout with 2 imageViews (one below the other) and a textView on the right of the upper one.

the upper imageView would have the large dot (filled or not), with optional dots above it, and the imageView below would stretch its size according to the textView (align to its bottom plus add some more for extra small-dots) and have tiled dots as its background.

another approach would be to have a listView of textViews and an imageView on its left, and you draw the circles according to what the listView is currently showing (even while scrolling). it's much harder, but might be more precise.

于 2013-07-31T22:03:32.733 回答