Skip to content

Commit

Permalink
work completed
Browse files Browse the repository at this point in the history
  • Loading branch information
RMoha2021 committed Mar 30, 2018
1 parent b7a9bb9 commit 3bf88dc
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 61 deletions.
90 changes: 49 additions & 41 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,49 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout
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:background="@color/tan_background"
android:orientation="vertical"
tools:context="com.example.android.miwok.MainActivity">

<TextView
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>
<!-- Numbers category -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/category_numbers">
<TextView
android:id="@+id/numbers"
style="@style/CategoryStyle"
android:background="?android:attr/selectableItemBackground"
android:text="@string/category_numbers" />
</FrameLayout>

<!-- Family category -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/category_family">
<TextView
android:id="@+id/family"
style="@style/CategoryStyle"
android:background="?android:attr/selectableItemBackground"
android:text="@string/category_family" />
</FrameLayout>

<!-- Colors category -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/category_colors">
<TextView
android:id="@+id/colors"
style="@style/CategoryStyle"
android:background="?android:attr/selectableItemBackground"
android:text="@string/category_colors" />
</FrameLayout>

<!-- Phrases category -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/category_phrases">
<TextView
android:id="@+id/phrases"
style="@style/CategoryStyle"
android:background="?android:attr/selectableItemBackground"
android:text="@string/category_phrases" />
</FrameLayout>
</LinearLayout>
39 changes: 31 additions & 8 deletions app/src/main/res/layout/list_item.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="@dimen/list_item_height"
android:orientation="horizontal"
android:padding="16dp">

Expand All @@ -12,26 +12,49 @@


<LinearLayout
android:id="@+id/text_container"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="@dimen/list_item_height"
android:paddingLeft="16dp"
android:id="@+id/text_container">
android:layout_alignParentTop="true"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_toRightOf="@+id/imageItem"
>

<TextView
android:id="@+id/miwok_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="bottom"
android:textStyle="bold"
android:textColor="@android:color/white"
android:textSize="18sp"/>
android:textAppearance="?android:textAppearanceMedium"
/>

<TextView
android:id="@+id/default_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="top"
android:textStyle="bold"
android:textColor="@android:color/white"
android:textSize="18sp"/>
android:textAppearance="?android:textAppearanceMedium"
/>
</LinearLayout>

</LinearLayout>
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="16dp"
android:src="@drawable/ic_play_arrow_white_24dp"
/>



</RelativeLayout>
14 changes: 3 additions & 11 deletions app/src/main/res/layout/word_list.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/list"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"

android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"

android:id="@+id/list"
>
</ListView>
android:drawSelectorOnTop="false"/>
2 changes: 1 addition & 1 deletion app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
<item name="android:textStyle">bold</item>
<item name="android:textAppearance">?android:textAppearanceMedium</item>
</style>
</resources>
</resources>

0 comments on commit 3bf88dc

Please sign in to comment.