1<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 xmlns:tools="http://schemas.android.com/tools" 3 android:layout_width="match_parent" 4 android:layout_height="match_parent" 5 android:paddingBottom="@dimen/activity_vertical_margin" 6 android:paddingLeft="@dimen/activity_horizontal_margin" 7 android:paddingRight="@dimen/activity_horizontal_margin" 8 android:paddingTop="@dimen/activity_vertical_margin" 9 tools:context=".GraphMetricsActivity" > 10 11 <com.androidplot.xy.XYPlot 12 android:id="@+id/graph_metrics" 13 android:layout_width="match_parent" 14 android:layout_height="match_parent" 15 android:layout_centerHorizontal="true" 16 androidPlot.title="BG Image Example" 17 androidPlot.titleWidget.labelPaint.textSize="@dimen/title_font_size" 18 androidPlot.domainLabelWidget.labelPaint.textSize="@dimen/domain_label_font_size" 19 androidPlot.rangeLabelWidget.labelPaint.textSize="@dimen/range_label_font_size" 20 androidPlot.graphWidget.marginTop="20dp" 21 androidPlot.graphWidget.marginLeft="15dp" 22 androidPlot.graphWidget.marginBottom="25dp" 23 androidPlot.graphWidget.marginRight="10dp" 24 androidPlot.graphWidget.rangeLabelPaint.textSize="@dimen/range_tick_label_font_size" 25 androidPlot.graphWidget.rangeOriginLabelPaint.textSize="@dimen/range_tick_label_font_size" 26 androidPlot.graphWidget.domainLabelPaint.textSize="@dimen/domain_tick_label_font_size" 27 androidPlot.graphWidget.domainOriginLabelPaint.textSize="@dimen/domain_tick_label_font_size" 28 androidPlot.legendWidget.textPaint.textSize="@dimen/legend_text_font_size" 29 androidPlot.legendWidget.iconSizeMetrics.heightMetric.value="15dp" 30 androidPlot.legendWidget.iconSizeMetrics.widthMetric.value="15dp" 31 androidPlot.legendWidget.heightMetric.value="25dp" 32 androidPlot.legendWidget.positionMetrics.xPositionMetric.value="0" 33 androidPlot.legendWidget.positionMetrics.anchor="right_bottom" 34 android:layout_centerVertical="true"/> 35 36 <ToggleButton 37 android:id="@+id/style_toggle" 38 android:layout_width="wrap_content" 39 android:layout_height="wrap_content" 40 android:layout_alignTop="@id/graph_metrics" 41 android:layout_alignRight="@id/graph_metrics" 42 android:layout_marginTop="15dp" 43 android:layout_marginRight="15dp" 44 android:textOn="bg on" 45 android:textOff="bg off" 46 android:onClick="onGraphStyleToggle" /> 47 48</RelativeLayout>