把复选框的AChartEngine图形下方 [英] Putting checkboxes below an AChartEngine graph
本文介绍了把复选框的AChartEngine图形下方的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想包括图形下面的一些复选框,但不知道怎么做。按照现在的情况,该图是sortav接管整个屏幕,所以我想我应该使它更小,这也是我不知道该怎么办启动。 这是它目前的样子时,我尽量表现的复选框:
I would like to include some checkboxes below the graph, but have no idea how to do so. As it stands, the graph is sortav taking over the whole screen, so I suppose I should start by making it smaller, which I also don't know how to do. This is what it currently looks like when I try to show the checkboxes:
此外,这里是我当前的XML code的布局:
Also, here is my current xml code for the layout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".ViewGraphActivity" >
<LinearLayout
android:id="@+id/chart_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_title"
android:orientation="horizontal" >
</LinearLayout>
<LinearLayout
android:id="@+id/checkbox_container"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:orientation="vertical" >
<TextView
android:id="@+id/checkBoxTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="View which lines:" />
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="103dp"
android:orientation="horizontal" >
<CheckBox
android:id="@+id/checkBox1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Distance" />
<CheckBox
android:id="@+id/checkBox2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="28dp"
android:text="Time" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="271dp"
android:layout_height="34dp"
android:layout_marginTop="34dp"
android:orientation="horizontal" >
<CheckBox
android:id="@+id/checkBox3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Velocity" />
<CheckBox
android:id="@+id/checkBox4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="28dp"
android:text="Calories" />
</LinearLayout>
</LinearLayout>
推荐答案
有关你的 checkbox_container
:
android:layout_centerVertical="true" => android:layout_alignParentBottom="true"
这篇关于把复选框的AChartEngine图形下方的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文