I am going through quickstart for androidPlot. http://androidplot.com/docs/quickstart/ In the example simple_xy_plot_example.xml layout file is defined with parameters such as
我正在通过quickstart for 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"
But where are these parameters defined? I mean how do I know to use titleWidget.labelPaint.textSize to define textSize?
但这些参数定义在哪里?我的意思是我如何知道使用titleWidget.labelPaint.textSize来定义textSize?
1 个解决方案
#1
0
Define these variables in res/values/dimens.xml
like this
像这样在res / values / dimens.xml中定义这些变量
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="title_font_size">16dp</dimen>
<dimen name="domain_label_font_size">12dp</dimen>
<dimen name="range_label_font_size">12dp</dimen>
<dimen name="range_tick_label_font_size">12dp</dimen>
<dimen name="domain_tick_label_font_size">12dp</dimen>
<dimen name="legend_text_font_size">12dp</dimen>
</resources>
Where domain_label_font_size
is the value you want to define.
其中domain_label_font_size是您要定义的值。
#1
0
Define these variables in res/values/dimens.xml
like this
像这样在res / values / dimens.xml中定义这些变量
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="title_font_size">16dp</dimen>
<dimen name="domain_label_font_size">12dp</dimen>
<dimen name="range_label_font_size">12dp</dimen>
<dimen name="range_tick_label_font_size">12dp</dimen>
<dimen name="domain_tick_label_font_size">12dp</dimen>
<dimen name="legend_text_font_size">12dp</dimen>
</resources>
Where domain_label_font_size
is the value you want to define.
其中domain_label_font_size是您要定义的值。