Skip to content

Instantly share code, notes, and snippets.

View MikeySmash's full-sized avatar

Mike Smith MikeySmash

View GitHub Profile
@MikeySmash
MikeySmash / soccercounter.xml
Created April 18, 2019 12:17
Udacity Android Developer - Soccer Counter - XML
<LinearLayout 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">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@MikeySmash
MikeySmash / soccercounter.java
Created April 18, 2019 12:19
Udacity Android Developer - Soccer Counter - Java
package com.example.android.soccercounter;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
/**
* Team A variables
@MikeySmash
MikeySmash / soccercounterstyles.xml
Created April 18, 2019 12:20
Udacity Android Developer - Soccer Counter - Styles
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light">
<!-- Primary theme color of the app (sets background color of app bar) -->
<item name="colorPrimary">#66cc33</item>
<!-- Background color of buttons in the app -->
<item name="colorButtonNormal">#66cc33</item>
</style>
</resources>
@MikeySmash
MikeySmash / quizapp.java
Last active May 4, 2019 11:43
RadioButton changes background color
package com.example.android.quizapp;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RadioButton;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
@MikeySmash
MikeySmash / quizapp.xml
Created May 4, 2019 11:26
RadioButton changes background color XML
<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"
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#455a64</item>
<item name="colorPrimaryDark">#1c313a</item>
<item name="colorAccent">#455a64</item>
<item name="colorButtonNormal">#80cbc4</item>
<resources>
<color name="primaryColor">#455a64</color>
<color name="primaryLightColor">#718792</color>
<color name="primaryDarkColor">#1c313a</color>
<color name="secondaryColor">#80cbc4</color>
<color name="secondaryLightColor">#b2fef7</color>
<color name="secondaryDarkColor">#4f9a94</color>
<color name="primaryTextColor">#ffffff</color>
<color name="secondaryTextColor">#000000</color>
<color name="main_bg">#fefeff</color>