question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi,

I managed to find an unpleasant bug. When I open spinner dropdown I cant’ close it. It propably try focus something and reopening spinner dropdown constantly.

However bug is only when MaterialSpinner is first focusable view in layout. Like this:

<LinearLayout
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:orientation="vertical"
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        >
      <com.tiper.MaterialSpinner
            android:hint="@string/hint_category"
            android:id="@+id/categoryTypeSpinner"
            android:layout_height="wrap_content"
            android:layout_width="match_parent"
            android:visibility="gone"
            app:boxBackgroundColor="@android:color/transparent"
            style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox"
            />
</LinearLayout>

When I add some focusable view like this:

<LinearLayout
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:orientation="vertical"
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        >
    <!-- Dirty hack. -->
    <com.google.android.material.textfield.TextInputLayout
            android:layout_height="1dp"
            android:layout_width="1dp"
            app:boxBackgroundColor="@android:color/transparent"
            style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox"
            >
        <com.google.android.material.textfield.TextInputEditText
                android:id="@+id/titleTextEdit"
                android:layout_height="wrap_content"
                android:layout_width="match_parent"
                />
    </com.google.android.material.textfield.TextInputLayout>
    <com.tiper.MaterialSpinner
            android:hint="@string/hint_category"
            android:id="@+id/categoryTypeSpinner"
            android:layout_height="wrap_content"
            android:layout_width="match_parent"
            android:visibility="gone"
            app:boxBackgroundColor="@android:color/transparent"
            style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox"
            />
</LinearLayout>

Material spinner will work fine.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
petr-stety-stetkacommented, Jul 4, 2019

Thanks, this lines added to spinner parent view and now it works fine.

android:descendantFocusability="beforeDescendants"`
android:focusable="true"
android:focusableInTouchMode="true"
0reactions
tipercommented, Apr 15, 2020

Hi @rajvimal your question seems unrelated with this issue.

I’ve moved your question to #27

Read more comments on GitHub >

github_iconTop Results From Across the Web

Focusbug | Cine RT Ultrasonic Rangefinder System
The miniature ULTRASONIC BUG TRANSMITTER is milled from rugged lightweight ABS, measures 1.6" x 1.6" x 0.4" (4 x 4 x 1 cm)...
Read more >
Focusbug CINE RT Ultrasonic Rangefinder Tracking System
The Focusbug CINE RT is an ultrasonic rangefinder tracking system. It consists of a Base sensor, Handset control unit, High-bright LED ...
Read more >
Focusbug Cine RT System - Facebook
Focusbug Cine RT System. 1497 likes · 18 talking about this. The Cine RT System: a complete ultrasonic rangefinder/tracking system designed by camera......
Read more >
Focus Bug CineRT Ranger - Focus24
Focus Bug CineRT Ranger rental by Focus24. Browse our inventory at focus24.tv.
Read more >
FocusBug Cine RT System Package Inc UBS-100 - CVP
FocusBug Technologies Inc UBS-100 (UBS0100) Cine RT System Package - Includes Ultrasonic Base Sensor. The CINE RT SYSTEM PACKAGE is comprised of four...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found