William Macleod
William Macleod

Reputation: 155

TextView not visible within scrollView

The TextView that is within the scrollView is not visible, even in the component tree.

When I hover over scrollView or TextView it says: This inspection highlights unallowed XML tags in Android resource files and AndroidManifest.xml.

I've added tools:ignore="contentDescription" in the RelativeLayout and that resolved an [Accessibility] Missing contentDescription attribute on image issue when I hovered over the 1st ImageView. But did not resolve the problem of my TextView being visible in the scrollView

<?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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingStart="12dp"
    android:paddingEnd="10dp"
    android:paddingTop="10dp"
    android:paddingBottom="10dp"
    android:background="#f9f9f9"
    tools:ignore="contentDescription"
    tools:context="com.example.william.notebook.NoteViewFragment">

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/viewNoteIcon"
        android:src="@drawable/p"
        android:layout_alignParentTop="true"
        android:layout_alignParentStart="true"
        android:layout_marginEnd="15dp"/>

    <scrollView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/noteScrollView"
        android:layout_alignParentTop="true"
        android:layout_alignParentEnd="true"
        android:layout_toEndOf="@+id/viewNoteIcon"
        android:layout_alignBottom="@+id/viewNoteIcon">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:text="Note Title"
            android:id="@+id/viewNoteTitle" />
    </scrollView>

</RelativeLayout>

Upvotes: 0

Views: 453

Answers (1)

rafaelc
rafaelc

Reputation: 59264

You wrote <scrollView>..</scrollView> while the correct tag is <ScrollView>...</ScrollView>

Upvotes: 3

Related Questions