• 11
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

I have a layout with two text input fields, which disappear & re-appear as options change.

However, when I use attribute app:endIconMode="clear_text", these two warnings flood the logs without end, for both of the text fields.

W/View: requestLayout() improperly called by com.google.android.material.textfield.TextInputEditText{ba3099c VFED..CL. ......ID 0,0-1244,272 #7f0a00c6 app:id/homeInput} during layout: running second layout pass

W/View: requestLayout() improperly called by com.google.android.material.textfield.TextInputEditText{f641714 VFED..CL. ......ID 0,0-1244,224 #7f0a00e6 app:id/lockInput} during layout: running second layout pass

The text fields that are visible depends on RadioButton selections

Snippet of one of the text field XMLs:

<com.google.android.material.textfield.TextInputLayout
    android:id="@+id/alt_sub"
    style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_marginStart="16dp"
    android:layout_marginTop="24dp"
    android:layout_marginEnd="40dp"
    android:animateLayoutChanges="true"
    app:boxCornerRadiusTopEnd="8dp"
    app:boxCornerRadiusTopStart="8dp"
    app:boxStrokeColor="@color/colorAccent"
    app:endIconMode="clear_text"
    app:hintTextColor="@color/colorAccent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/main_sub">

    <com.google.android.material.textfield.TextInputEditText
        android:id="@+id/lockInput"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_+"
        android:fontFamily="@font/opensansregular"
        android:inputType="textNoSuggestions" />
</com.google.android.material.textfield.TextInputLayout>

Whenever I call setText() or setHint() in the Activity class, the warning starts to pop up. The warnings only stop when the text field is empty.

I feel that this may be related to the attribute app:endIconMode="clear_text", but I can't find a way to use it without getting these warnings.