Skip to content

Commit

Permalink
Starter code
Browse files Browse the repository at this point in the history
  • Loading branch information
Beginning Android committed Apr 29, 2016
1 parent 3206ef8 commit a6df7e7
Show file tree
Hide file tree
Showing 11 changed files with 78 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@
*/
package com.example.android.miwok;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

// Set the content of the activity to use the activity_main.xml layout file
setContentView(R.layout.activity_main);
}
}
37 changes: 28 additions & 9 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,37 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<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:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="@color/tan_background"
android:orientation="vertical"
tools:context="com.example.android.miwok.MainActivity">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!" />
</RelativeLayout>
android:id="@+id/numbers"
style="@style/CategoryStyle"
android:background="@color/category_numbers"
android:text="@string/category_numbers" />

<TextView
android:id="@+id/family"
style="@style/CategoryStyle"
android:background="@color/category_family"
android:text="@string/category_family" />

<TextView
android:id="@+id/colors"
style="@style/CategoryStyle"
android:background="@color/category_colors"
android:text="@string/category_colors" />

<TextView
android:id="@+id/phrases"
style="@style/CategoryStyle"
android:background="@color/category_phrases"
android:text="@string/category_phrases" />

</LinearLayout>
Binary file modified app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 20 additions & 3 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,24 @@
limitations under the License.
-->
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<!-- Primary color of the app (shown in the app bar) -->
<color name="primary_color">#4A312A</color>

<!-- Primary dark color of the app (shown in the status bar) -->
<color name="primary_dark_color">#2F1D1A</color>

<!-- Background color for app -->
<color name="tan_background">#FFF7DA</color>

<!-- Background color for the numbers category -->
<color name="category_numbers">#FD8E09</color>

<!-- Background color for the family members category -->
<color name="category_family">#379237</color>

<!-- Background color for the colors category -->
<color name="category_colors">#8800A0</color>

<!-- Background color for the phrases category -->
<color name="category_phrases">#16AFCA</color>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
limitations under the License.
-->
<resources>
<!-- Height of each list item -->
<dimen name="list_item_height">88dp</dimen>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
Expand Down
13 changes: 13 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,18 @@
limitations under the License.
-->
<resources>
<!-- Title for the application. [CHAR LIMIT=12] -->
<string name="app_name">Miwok</string>

<!-- Category name for phrases [CHAR LIMIT=20] -->
<string name="category_phrases">Phrases</string>

<!-- Category name for the vocabulary words for colors [CHAR LIMIT=20] -->
<string name="category_colors">Colors</string>

<!-- Category name for the vocabulary words for numbers [CHAR LIMIT=20] -->
<string name="category_numbers">Numbers</string>

<!-- Category name for the vocabulary words for family members [CHAR LIMIT=20] -->
<string name="category_family">Family Members</string>
</resources>
16 changes: 12 additions & 4 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,18 @@

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="colorPrimary">@color/primary_color</item>
<item name="colorPrimaryDark">@color/primary_dark_color</item>
</style>

<!-- Style for a category of vocabulary words -->
<style name="CategoryStyle">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">@dimen/list_item_height</item>
<item name="android:gravity">center_vertical</item>
<item name="android:padding">16dp</item>
<item name="android:textColor">@android:color/white</item>
<item name="android:textStyle">bold</item>
<item name="android:textAppearance">?android:textAppearanceMedium</item>
</style>
</resources>

0 comments on commit a6df7e7

Please sign in to comment.