Skip to content
This repository has been archived by the owner on Mar 27, 2022. It is now read-only.

Selected position becomes -1 on device rotation, but the selector doesn't change. #36

Open
kungfucat opened this issue Feb 9, 2018 · 0 comments

Comments

@kungfucat
Copy link

Code used :

        <co.ceryle.radiorealbutton.RadioRealButtonGroup
            android:id="@+id/answerRadioButtonGroup"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:elevation="2dp"
            app:rrbg_animateTexts_enter="overshoot"
            app:rrbg_animateTexts_scale="2"
            app:rrbg_animateTexts_textColorFrom="@android:color/black"
            app:rrbg_animateTexts_textColorTo="@color/white"
            app:rrbg_backgroundColor="@color/white"
            app:rrbg_dividerColor="@android:color/black"
            app:rrbg_dividerPadding="10dp"
            app:rrbg_dividerRadius="0dp"
            app:rrbg_dividerSize="1dp"
            app:rrbg_selectorAboveOfBottomLine="true"
            app:rrbg_selectorColor="#2196F3"
            app:rrbg_selectorFullSize="true"
            app:rrbg_selectorSize="4dp">

            <co.ceryle.radiorealbutton.RadioRealButton
                android:id="@+id/radioButtonA"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:rrb_ripple="true"
                app:rrb_rippleColor="@android:color/black"
                app:rrb_text="A"
                app:rrb_textColor="@android:color/black" />

            <co.ceryle.radiorealbutton.RadioRealButton
                android:id="@+id/radioButtonB"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:rrb_ripple="true"
                app:rrb_rippleColor="@android:color/black"
                app:rrb_text="B"
                app:rrb_textColor="@android:color/black" />

            <co.ceryle.radiorealbutton.RadioRealButton
                android:id="@+id/radioButtonC"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:rrb_ripple="true"
                app:rrb_rippleColor="@android:color/black"
                app:rrb_text="C"
                app:rrb_textColor="@android:color/black" />

            <co.ceryle.radiorealbutton.RadioRealButton
                android:id="@+id/radioButtonD"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:rrb_ripple="true"
                app:rrb_rippleColor="@android:color/black"
                app:rrb_text="D"
                app:rrb_textColor="@android:color/black" />

            <co.ceryle.radiorealbutton.RadioRealButton
                android:id="@+id/radioButtonE"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:rrb_ripple="true"
                app:rrb_rippleColor="@android:color/black"
                app:rrb_text="E"
                app:rrb_textColor="@android:color/black" />

        </co.ceryle.radiorealbutton.RadioRealButtonGroup>

This is a part of a fragment inside a ViewPager. On device rotation, the selected option becomes -1, but the selector remains on the option selected previously. Here is a video of the same : http://kungfucat.me/images/temporaryAttachment.mp4

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant