How to add horizontal scroll view below a listview

rogue_shadow

How to put a horizontal scrollview below a listview? I have a listview and below it a horizontal scroll view with a bunch of radio buttons. This is my code:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ListView
        android:id="@+id/list"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/radioGroup">
    </ListView>

    <RadioGroup
        android:id="@+id/radioGroup"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:orientation="horizontal"
        android:layout_alignParentBottom="true"
        android:layout_alignParentStart="true">

        <RadioButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:button="@null"
            android:checked="true"
            android:gravity="center"
            android:padding="5dp"
            android:text="/>

        <RadioButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:button="@null"
            android:gravity="center"
            android:padding="5dp"
            android:text="A-"/>


        <RadioButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:button="@null"
            android:gravity="center"
            android:padding="5dp"
            android:text="B+"/>

        <RadioButton
            android:id="@+id/bNegative"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:button="@null"
            android:gravity="center"
            android:padding="5dp"
            android:text="/>

    </RadioGroup>

</RelativeLayout>

I need to be able to scroll the listview as normal i.e. vertically and the horizontal scroll view horizontally. Right now i can't scroll the listview but can scroll the horizontal scroll view. Please help me out

Aashutosh Kumar

use recyclerview to scroll both horizontal and vertical according to your requirement by setting orientation of recyclerview

to scroll vertical set orientation

 android:orientation="vertical "

and scroll horizontal set orientation

 android:orientation="horizontal"

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to add space below scroll view

Android: How to add Image and then text below it in scroll view?

How to add Date Picker in Horizontal paging scroll view?

How to display in horizontal scroll view

How to center a view in parent and add a view below it inside a Relative Layout inside a Scroll view

Android dynamically add cardview into horizontal scroll view

How to scroll and view an element below a listview if it takes up the entire screen in Android?

How to add a scroll View

How to make Horizontal Scroll ListView inside the SingleChildScroll

How to add a view that disappears when scroll up (go down in listview) and appears when scroll down?

How to add the View below the TableView?

How to get width of a horizontal scroll view

How to get position in horizontal scroll view

How to show all dates in a horizontal scroll view

How to add a vertical and horizontal scroll bar in a JTextArea to view complete file - JAVA

How to add a Scroll area for a horizontal layout in Qt?

How to Add Header in horizontal Listbox with Scroll

How to add horizontal scroll in Material UI grid

How to add Right side padding to Horizontal scroll?

How to add horizontal scroll on vertical recyclerview?

How to add a horizontal scroll bar on smartphone?

how to add horizontal scroll bar flutter

horizontal recycler view with horizontal scroll

How to get scroll states in a Horizontal Scroll View: Android

How to scroll to chip when clicked in horizontal scroll view?

Recycler view inside Horizontal scroll view not work in android oreo but is working perfectly in below versions

Horizontal scroll in collection view

Horizontal scroll view not scrolling

Add Horizontal Scroll Table