1

How to create scrollViews in harmonyOS? CSS/HTML/JS accepted, not java, because I develop on smart devices.

Android:

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fillViewport="true">

    <TableLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:stretchColumns="1">

        <!-- everything you already have -->

    </TableLayout>
</ScrollView>

Basically I want to create a parent scrollview and then put divs in that:

[SCROLLVIEW_START]

<slider value="7" max="10" min="0"
        style="background-color : transparent; width : 454px; height : 50px;"/>

<div for="{{ array }}" tid="id" onclick="changeText"
     style="background-color : #11efefef; align-items: center;
        border-color: black; border-width: 2px; height: 60px; width: 404px;">
    <text style="padding: 20px; color: white;">{{ $idx }}.{{ $item.name }}</text>
</div>

[SCROLLVIEW_END]

So how?

lacas
  • 13,928
  • 30
  • 109
  • 183

1 Answers1

0

The following are JS Components and Examples:

scroll

div

zhangxaochen
  • 32,744
  • 15
  • 77
  • 108