TextView
, который находится в пределах scrollView
, не отображается даже в дереве компонентов.TextView не отображается внутри scrollView
Когда я нависаю над scrollView или TextView, он говорит: Эта проверка подчеркивает недопустимые теги XML в файлах ресурсов Android и AndroidManifest.xml.
Я добавил tools:ignore="contentDescription"
в RelativeLayout, и это решило проблему [Accessibility] Missing contentDescription attribute on image
, когда я зависал над 1-м ImageView. Но не удалось решить проблему моей TextView
быть видимым в 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>
Кроме того, убедитесь цвет текста в хорошем контрасте с цветом фона :) – Neeraj