Created
November 12, 2016 18:48
-
-
Save 100rabhkr/aabfcfd2a032ff747e95b4dd60e9408a to your computer and use it in GitHub Desktop.
xml code for court counter app udacity
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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:id="@+id/activity_main" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
tools:context="com.example.android.courtcounter.MainActivity"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:orientation="horizontal"> | |
<LinearLayout | |
android:layout_width="0dp" | |
android:layout_height="wrap_content" | |
android:orientation="vertical" | |
android:layout_weight="1"> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:gravity="center_horizontal" | |
android:padding="4dp" | |
android:text="Team A" /> | |
<TextView | |
android:id="@+id/team_a_score" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:gravity="center_horizontal" | |
android:padding="4dp" | |
android:text="0" /> | |
<Button | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
android:onClick="PlusThreeForTeamA" | |
android:text="+3 points" /> | |
<Button | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
android:onClick="PlusTwoForTeamA" | |
android:text="+2 points" /> | |
<Button | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
android:onClick="FreeThrowForTeamA" | |
android:text="free throw" /> | |
</LinearLayout> | |
<View | |
android:layout_width="1dp" | |
android:layout_height="fill_parent" | |
android:background="#FF000000" | |
android:layout_weight="0" | |
/> | |
<LinearLayout | |
android:layout_width="0dp" | |
android:layout_height="wrap_content" | |
android:orientation="vertical" | |
android:layout_weight="1"> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:gravity="center_horizontal" | |
android:padding="4dp" | |
android:text="Team B" /> | |
<TextView | |
android:id="@+id/team_b_score" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:gravity="center_horizontal" | |
android:padding="4dp" | |
android:text="0" /> | |
<Button | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
android:onClick="PlusThreeForTeamB" | |
android:text="+3 points" /> | |
<Button | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
android:onClick="PlusTwoForTeamB" | |
android:text="+2 points" /> | |
<Button | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
android:onClick="FreeThrowForTeamB" | |
android:text="free throw" /> | |
</LinearLayout> | |
</LinearLayout> | |
<Button | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="50dp" | |
android:onClick="Reset" | |
android:text="Reset" /> | |
</LinearLayout> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment