ScrollView
を使用する小さなアンドロイドアプリを開発しています。私はすでにRelativeLayout
をScrollView
に持っています。私は既に商品でいっぱいです。今度は、スクロールバーのスクロールバーが表示されているにもかかわらず、もっと多くのアイテムを追加するためのスペースを作成するためにスクロールしたいと思います。それを行う方法はありますか?私は、デザインビューで作業好きなのにここでアンドロイドスタジオでのスクロール表示のスクロール
は、XMLコードです:あなたはスクリーンショットで見ることができるように
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_new_reminder"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="0dp"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:paddingTop="0dp"
tools:context="com.steveops.locationreminder.NewReminderActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="700dp"
android:padding="5dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="11dp"
android:layout_marginStart="11dp">
<TextView
android:text="REMINDER NAME"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textView" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:text="Name"
android:ems="10"
android:id="@+id/editText2"
android:layout_below="@+id/textView"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<TextView
android:text="ACTIVATE ON"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textView5"
android:layout_below="@+id/editText2"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<CheckBox
android:text="M"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textView5"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:id="@+id/checkBox7" />
<CheckBox
android:text="T"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textView5"
android:layout_toRightOf="@+id/checkBox7"
android:layout_toEndOf="@+id/checkBox7"
android:id="@+id/checkBox8" />
<CheckBox
android:text="W"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/checkBox8"
android:layout_toRightOf="@+id/checkBox8"
android:layout_toEndOf="@+id/checkBox8"
android:id="@+id/checkBox9" />
<CheckBox
android:text="T"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/checkBox9"
android:layout_toRightOf="@+id/checkBox9"
android:layout_toEndOf="@+id/checkBox9"
android:id="@+id/checkBox10" />
<CheckBox
android:text="F"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/checkBox10"
android:layout_toRightOf="@+id/checkBox10"
android:layout_toEndOf="@+id/checkBox10"
android:id="@+id/checkBox11" />
<CheckBox
android:text="S"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/checkBox11"
android:layout_toRightOf="@+id/checkBox11"
android:layout_toEndOf="@+id/checkBox11"
android:id="@+id/checkBox12" />
<CheckBox
android:text="S"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/checkBox12"
android:layout_toRightOf="@+id/checkBox12"
android:layout_toEndOf="@+id/checkBox12"
android:id="@+id/checkBox13" />
<TextView
android:text="BETWEEN"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textView7"
android:layout_below="@+id/checkBox7"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<TimePicker
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/timePicker"
android:layout_below="@+id/textView7"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_toStartOf="@+id/checkBox12"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
</ScrollView>
</RelativeLayout>
、ScrollView
のスクロールバーが表示されますが、私はスクロールすることはできませんよ例えば、新しい時間ピッカーを追加するのに十分なスペースを作成する。私は理にかなっているといい。
xmlの一部のコードを投稿できますか/ – vidulaJ
コードが正常に動作していますスクロールが機能していて、スペースがあるだけでなく、何が欲しいのですか? –
こんにちは、@あなたのコードが働いています..きれいにして、あなたのプロジェクトを再構築してください。 –