ボタンとアンドロイドプロットを一緒にスクロールビューに入れて、スクロールしてボタンを見ることができないようにしました。私はandroidplot 0.9.8を使用しています。ボタンとアンドロイドプロットをスクロールビューに追加する
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ap="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="example.example.MainActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/plotLayout">
<com.androidplot.xy.XYPlot
android:id="@+id/plot"
android:layout_width="match_parent"
android:layout_height="match_parent"
ap:Label="test"
ap:domainLabel="test"
ap:rangeLabel="test"
ap:renderMode="use_main_thread"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_below="@id/plot">
<Button
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="test"/>
<Button
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="test"/>
</LinearLayout>
</RelativeLayout>
</ScrollView>
EDIT:それは私が(androidplotのための一定の高さを指定するときことが思わ例えばアンドロイド:= "600dp" の代わりにアンドロイドのlayout_height:layout_height =ここ
は私のxmlファイルであります"match_parent")それはうまくスクロールします。 match_parentを使用するとスクロールできないのはなぜですか?
あなたはRelativeViewが正しく閉じられていません –
、申し訳ありません。まだ同じ問題が発生しています –