Created
July 29, 2016 00:45
-
-
Save ericlucero/c4d158a7561e6add1536e518341dcd2a to your computer and use it in GitHub Desktop.
Activity_Main.xml for Basketball Score Counter
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"?> | |
<RelativeLayout 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:paddingBottom="@dimen/activity_vertical_margin" | |
android:paddingLeft="@dimen/activity_horizontal_margin" | |
android:paddingRight="@dimen/activity_horizontal_margin" | |
android:paddingTop="@dimen/activity_vertical_margin" | |
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="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_weight="1" | |
android:paddingTop="16dp" | |
android:paddingLeft="24dp" | |
android:paddingRight="24dp" | |
android:orientation="vertical"> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:gravity="center" | |
android:padding="4sp" | |
android:text="Team A" | |
android:fontFamily="sans-serif-medium" | |
android:textColor="#616161" | |
android:textSize="14sp" /> | |
<TextView | |
android:id="@+id/team_a_score" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:gravity="center_horizontal" | |
android:paddingTop="16dp" | |
android:paddingBottom="24dp" | |
android:textColor="#000000" | |
android:fontFamily="sans-serif-light" | |
android:text="0" | |
android:textSize="56sp" /> | |
<Button | |
android:id="@+id/points3" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
android:onClick="SumaTresTeamA" | |
android:text="+3 points" /> | |
<Button | |
android:id="@+id/points2" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
android:onClick="SumaDosTeamA" | |
android:text="+2 points" /> | |
<Button | |
android:id="@+id/points1" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
android:onClick="SumaUnoTeamA" | |
android:text="free throw" | |
android:textAllCaps="true" /> | |
</LinearLayout> | |
<View | |
android:layout_width="1dp" | |
android:layout_height="match_parent" | |
android:background="@android:color/darker_gray"/> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_weight="1" | |
android:paddingTop="16dp" | |
android:paddingLeft="24dp" | |
android:paddingRight="24dp" | |
android:orientation="vertical"> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:gravity="center" | |
android:padding="4dp" | |
android:text="Team B" | |
android:fontFamily="sans-serif-medium" | |
android:textColor="#616161" | |
android:textSize="14sp" /> | |
<TextView | |
android:id="@+id/team_b_score" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:gravity="center_horizontal" | |
android:paddingTop="16dp" | |
android:paddingBottom="24dp" | |
android:textColor="#000000" | |
android:fontFamily="sans-serif-light" | |
android:text="0" | |
android:textSize="56sp" /> | |
<Button | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
android:onClick="SumaTresTeamB" | |
android:text="+3 points" /> | |
<Button | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
android:onClick="SumaDosTeamB" | |
android:text="+2 points" /> | |
<Button | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
android:onClick="SumaUnoTeamB" | |
android:text="free throw" | |
android:textAllCaps="true" /> | |
</LinearLayout> | |
</LinearLayout> | |
<Button | |
android:onClick="resetea" | |
android:layout_alignParentBottom="true" | |
android:layout_centerHorizontal="true" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="reset" | |
android:layout_marginBottom="32dp" | |
android:textAllCaps="true" | |
android:textSize="20sp" | |
/> | |
</RelativeLayout> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment