Skip to content
This repository was archived by the owner on Feb 8, 2022. It is now read-only.
This repository was archived by the owner on Feb 8, 2022. It is now read-only.

BUG: get focus when a layout is placed below #40

Open
@CyrilNb

Description

@CyrilNb

Hi,

I'd like to report a bug when the MaterialTextField is placed above a RecyclerView or Gridview.
On the display of the activity, the keyboard is opened automatically, without editText getting the focus.
That's a very weird behaviour.

But only with a layout below. It doesn't occur with a simple TextView or button below your MaterialEditText.

This is my current XML:

        <com.github.florent37.materialtextfield.MaterialTextField
            android:id="@+id/materialTxtField"
            android:layout_width="291dp"
            android:layout_height="wrap_content"

            android:layout_gravity="bottom|center_vertical|center_horizontal"
            android:layout_weight="1"
            app:mtf_animationDuration="250"
            app:mtf_cardCollapsedHeight="4dp"
            app:mtf_image="@drawable/gold_star_icon"
            app:mtf_labelColor="@color/colorPrimaryLight"
            app:mtf_openKeyboardOnFocus="true">

            <EditText
                android:id="@+id/editTxtPlayerName"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/player_name"
                android:inputType="none" />

        </com.github.florent37.materialtextfield.MaterialTextField>

        <ImageButton
            android:id="@+id/btnRetrieveTime"
            android:layout_width="77dp"
            android:layout_height="55dp"
            android:layout_gravity="bottom"
            android:layout_marginStart="5dp"
            android:layout_weight="1"
            android:adjustViewBounds="true"
            android:background="@drawable/roundedcorner"
            android:contentDescription="@string/btnGetTime"
            android:padding="2dp"
            android:scaleType="fitCenter"
            android:src="@drawable/ic_chrono2" />
    </LinearLayout>

    <android.support.v7.widget.RecyclerView
        android:id="@+id/recyclerView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_marginBottom="10dp"
        android:layout_marginEnd="20dp"
        android:layout_marginStart="20dp"
        android:layout_marginTop="50dp"
        android:animationCache="false"
        android:layoutAnimation="@anim/layout_animation_fall_down"
        android:scrollbars="none" />

Could you help me please ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions