Skip to content

Commit 3fab896

Browse files
committed
remoed unused code from templateActivity and made optimisations to list by removing margin and adding padding instead to listview..so that when listview scroll, there is no gap between listview and toolbar and at the same time, both appear distinguished as toolbar has drop shadow below it...So that effect looks good.
1 parent cf86e02 commit 3fab896

2 files changed

Lines changed: 13 additions & 27 deletions

File tree

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,20 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools"
44
android:layout_width="match_parent"
55
android:layout_height="match_parent"
6-
tools:context="org.buildmlearn.toolkit.fragment.TestFragment">
6+
android:orientation="vertical">
77

8-
<include layout="@layout/toolbar_layout"/>
8+
<include layout="@layout/toolbar_layout" />
99

1010
<GridView
1111
android:id="@android:id/list"
1212
android:layout_width="match_parent"
1313
android:layout_height="match_parent"
14-
android:layout_below="@+id/toolbar"
15-
android:layout_margin="@dimen/layout_margin"
14+
android:clipToPadding="false"
1615
android:horizontalSpacing="8dp"
1716
android:numColumns="2"
17+
android:padding="@dimen/layout_margin"
1818
android:verticalSpacing="8dp" />
1919

20-
<TextView
21-
android:id="@android:id/empty"
22-
android:layout_width="match_parent"
23-
android:layout_height="match_parent"
24-
android:layout_below="@+id/toolbar"
25-
android:gravity="center" />
26-
27-
</RelativeLayout>
20+
</LinearLayout>
Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,20 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools"
44
android:layout_width="match_parent"
55
android:layout_height="match_parent"
6-
tools:context="org.buildmlearn.toolkit.fragment.TestFragment">
6+
android:orientation="vertical">
77

8-
<include layout="@layout/toolbar_layout"/>
8+
<include layout="@layout/toolbar_layout" />
99

1010
<ListView
1111
android:id="@android:id/list"
1212
android:layout_width="match_parent"
1313
android:layout_height="match_parent"
14-
android:layout_below="@+id/toolbar"
15-
android:layout_margin="@dimen/layout_margin"
14+
android:clipToPadding="false"
1615
android:divider="@android:color/transparent"
17-
android:dividerHeight="8dp" />
18-
19-
<TextView
20-
android:id="@android:id/empty"
21-
android:layout_width="match_parent"
22-
android:layout_height="match_parent"
23-
android:layout_below="@+id/toolbar"
24-
android:gravity="center" />
16+
android:dividerHeight="8dp"
17+
android:padding="@dimen/layout_margin" />
2518

2619

27-
</RelativeLayout>
20+
</LinearLayout>

0 commit comments

Comments
 (0)