【问题标题】:why can't i access the field which are not in the constraint layout frame为什么我不能访问不在约束布局框架中的字段
【发布时间】:2020-04-26 16:50:35
【问题描述】:

This shows the app image in which the button is below the confirm password

我想访问确认密码字段下方的按钮,但此约束布局不是可滚动的,因此我无法访问不适合 fram 的字段

【问题讨论】:

  • 将约束布局放入nestedScrollView 或 ScrollView

标签: android android-layout constraints


【解决方案1】:

必须有一个 ScrollView。

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

     <!-- your code -->

</ScrollView>

Android - how to make a scrollable constraintlayout?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多