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

how to get 'Textview' from 'Radio Button' in programmatically? #40

Open
DevSanSon opened this issue May 21, 2018 · 0 comments
Open

how to get 'Textview' from 'Radio Button' in programmatically? #40

DevSanSon opened this issue May 21, 2018 · 0 comments

Comments

@DevSanSon
Copy link

DevSanSon commented May 21, 2018

`
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto">

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <co.ceryle.radiorealbutton.library.RadioRealButtonGroup
        android:id="@+id/radioGroupBtnMatcher"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:rrbg_animateDrawables_enter="overshoot"
        app:rrbg_animateTexts_enter="overshoot"
        app:rrbg_dividerColor="@color/colorAccent"
        app:rrbg_dividerSize="1dp"
        app:rrbg_selectorColor="@color/colorPrimaryDark"
        app:rrbg_selectorSize="6dp">


        <co.ceryle.radiorealbutton.library.RadioRealButton
            android:id="@+id/btnRadioOne"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:paddingRight="15dp">

            <ImageView
                android:id="@+id/imageFirst"
                android:layout_width="42dp"
                android:layout_height="42dp"
                android:layout_marginBottom="3dp"
                android:layout_marginTop="3dp" />

            <TextView
                android:id="@+id/nameFirst"
                android:layout_width="115dp"
                android:layout_height="wrap_content"
                android:layout_alignParentTop="true"
                android:layout_marginLeft="10dp"
                android:text="line 1"
                android:textColor="@android:color/black"
                android:textSize="9dp"
                android:textStyle="bold" />
        </co.ceryle.radiorealbutton.library.RadioRealButton>

        <co.ceryle.radiorealbutton.library.RadioRealButton
            android:id="@+id/btnRadioTwo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:paddingLeft="15dp"
            android:paddingRight="15dp">

            <ImageView
                android:id="@+id/imageSecond"
                android:layout_width="42dp"
                android:layout_height="42dp"
                android:layout_marginBottom="3dp"
                android:layout_marginLeft="15dp"
                android:layout_marginTop="3dp" />

            <TextView
                android:id="@+id/nameSecond"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentTop="true"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:text="line 1"
                android:textColor="@android:color/black"
                android:textSize="9dp"
                android:textStyle="bold" />
        </co.ceryle.radiorealbutton.library.RadioRealButton>


    </co.ceryle.radiorealbutton.library.RadioRealButtonGroup>
</RelativeLayout>

</android.support.v7.widget.CardView>`

I use recyclerView. So I can't get TextView value and ImageView url. How do it?

btns.setOnClickedButtonListener(new RadioRealButtonGroup.OnClickedButtonListener() { @Override public void onClickedButton(RadioRealButton button, int position) { Log.i("AlDAA", "OnClick"); Toast.makeText(MatchAdapter.context, "Clicked: "+position+" "+button, Toast.LENGTH_SHORT).show(); } });

this is not working :( 👎

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