Created
May 4, 2019 11:26
-
-
Save MikeySmash/076298b7763423623f479aad95b70c0b to your computer and use it in GitHub Desktop.
RadioButton changes background color XML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
tools:context=".MainActivity" | |
android:background="@color/main_bg"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:orientation="vertical"> | |
<RadioGroup | |
android:id="@+id/q1" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="8dp" | |
android:orientation="vertical"> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:textSize="18dp" | |
android:layout_marginTop="8dp" | |
android:layout_marginRight="16dp" | |
android:layout_marginLeft="16dp" | |
android:layout_marginBottom="8dp" | |
android:textStyle="bold" | |
android:fontFamily="sans-serif-condensed-medium" | |
android:textColor="@color/secondaryTextColor" | |
android:text="Question 1:"/> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:textSize="18dp" | |
android:layout_marginTop="8dp" | |
android:layout_marginRight="16dp" | |
android:layout_marginLeft="16dp" | |
android:layout_marginBottom="8dp" | |
android:textColor="@color/secondaryTextColor" | |
android:fontFamily="sans-serif-condensed-light" | |
android:text="What is your name?"/> | |
<RadioButton | |
android:id="@+id/q1_answer1" | |
style="@style/RadioButtonStyle" | |
android:onClick="onSelect" | |
android:fontFamily="sans-serif-condensed-light" | |
android:text="Bob" /> | |
<RadioButton | |
android:id="@+id/q1_answer2" | |
style="@style/RadioButtonStyle" | |
android:onClick="onSelect" | |
android:fontFamily="sans-serif-condensed-light" | |
android:text="Billy" /> | |
<RadioButton | |
android:id="@+id/q1_answer3" | |
style="@style/RadioButtonStyle" | |
android:fontFamily="sans-serif-condensed-light" | |
android:onClick="onSelect" | |
android:text="Ben" /> | |
<RadioButton | |
android:id="@+id/q1_answer4" | |
style="@style/RadioButtonStyle" | |
android:onClick="onSelect" | |
android:fontFamily="sans-serif-condensed-light" | |
android:text="Brian" /> | |
</RadioGroup> | |
</LinearLayout> | |
</ScrollView> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment