【发布时间】:2026-01-24 02:25:01
【问题描述】:
我正在浏览 androidPlot 的快速入门。 http://androidplot.com/docs/quickstart/ 在示例 simple_xy_plot_example.xml 布局文件中定义了诸如
之类的参数androidPlot.titleWidget.labelPaint.textSize="@dimen/title_font_size"
androidPlot.domainLabelWidget.labelPaint.textSize="@dimen/domain_label_font_size"
androidPlot.rangeLabelWidget.labelPaint.textSize="@dimen/range_label_font_size"
androidPlot.graphWidget.marginTop="20dp"
androidPlot.graphWidget.marginLeft="15dp"
androidPlot.graphWidget.marginBottom="25dp"
但是这些参数是在哪里定义的呢?我的意思是我怎么知道使用 titleWidget.labelPaint.textSize 来定义 textSize?
【问题讨论】:
-
向下滚动一点,您会在
res/values/dimens.xml部分找到它。 -
我的意思是如何定义层次结构路径,例如ndroidPlot.graphWidget.marginLeft
-
抱歉造成误会。您可以找到 XYPlot 的文档here。你可以在那里找到它的所有成员。您看不到它的属性,但您会发现它的所有 getter 和 setter。只需删除 get/set 即可获得您的财产。
标签: android xml android-layout androidplot