1

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

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?

user2661518
  • 2,677
  • 9
  • 42
  • 79
  • Scroll down a bit more and you'll find it in the `res/values/dimens.xml` section. – actaram Apr 08 '15 at 19:03
  • I mean how do I define hierarchy path e.g. ndroidPlot.graphWidget.marginLeft – user2661518 Apr 08 '15 at 19:06
  • 1
    Sorry for the misunderstanding. You can find the XYPlot's documentation [here](http://androidplot.com/javadoc/0.6.0/com/androidplot/xy/XYPlot.html). You can find all its members there. You can't see its properties, but you'll find all its getters and setters. Just remove the get/set and you got your property. – actaram Apr 08 '15 at 19:17

1 Answers1

0

Define these variables in res/values/dimens.xml like this

<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.

Eageon
  • 23
  • 3