Skip to content
This repository was archived by the owner on Jun 23, 2022. It is now read-only.

Commit 57b2926

Browse files
author
Lyla
committed
5.11 Coding Task for Activated List Item (quiz)
1 parent c3e328f commit 57b2926

File tree

5 files changed

+16
-1
lines changed

5 files changed

+16
-1
lines changed

app/src/main/res/layout/fragment_main.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
tools:context=".MainActivity$ForecastFragment">
1111

1212
<ListView
13+
style="@style/ForecastListStyle"
1314
android:id="@+id/listview_forecast"
1415
android:layout_width="match_parent"
1516
android:layout_height="match_parent" />

app/src/main/res/layout/list_item_forecast.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
android:gravity="center_vertical"
88
android:minHeight="?android:attr/listPreferredItemHeight"
99
android:orientation="horizontal"
10+
android:background="@drawable/touch_selector"
1011
android:padding="16dp">
1112

1213
<ImageView

app/src/main/res/layout/list_item_forecast_today.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
android:gravity="center_vertical"
77
android:minHeight="?android:attr/listPreferredItemHeight"
88
android:orientation="horizontal"
9+
android:background="@drawable/touch_selector"
910
android:padding="16dp">
1011

1112
<LinearLayout
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<resources>
2+
3+
<style name="ForecastListStyle">
4+
<item name="android:choiceMode">singleChoice</item>
5+
</style>
6+
7+
</resources>

app/src/main/res/values/styles.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,9 @@
55
<!-- Customize your theme here. -->
66
</style>
77

8-
</resources>
8+
<style name="ForecastListStyle">
9+
<!-- Here it's a stub. In screens of sufficient width, this style includes modifications
10+
for two-pane layout -->
11+
</style>
12+
13+
</resources>

0 commit comments

Comments
 (0)