|
13 | 13 | See the License for the specific language governing permissions and |
14 | 14 | limitations under the License. |
15 | 15 | --> |
16 | | -<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" |
17 | | - xmlns:tools="http://schemas.android.com/tools" |
| 16 | +<RelativeLayout |
| 17 | +xmlns:android="http://schemas.android.com/apk/res/android" |
| 18 | +xmlns:app="http://schemas.android.com/apk/res-auto" |
18 | 19 | android:layout_width="match_parent" |
19 | | - android:layout_height="match_parent" |
20 | | - tools:context="com.example.android.sunshine.app.ForecastFragment"> |
21 | | - <ListView |
22 | | - style="@style/ForecastListStyle" |
23 | | - android:id="@+id/listview_forecast" |
24 | | - android:layout_width="match_parent" |
| 20 | + android:layout_height="match_parent"> |
| 21 | + <include layout="@layout/fragment_main_base" |
| 22 | + android:layout_below="@+id/appbar" |
25 | 23 | android:layout_height="match_parent" |
26 | | - android:divider="@null" /> |
27 | | - <!-- empty list --> |
28 | | - <TextView |
29 | | - android:id="@+id/listview_forecast_empty" |
30 | | - android:text="@string/empty_forecast_list" |
| 24 | + android:layout_width="match_parent"/> |
| 25 | + <LinearLayout |
| 26 | + android:id="@+id/appbar" |
31 | 27 | android:layout_width="match_parent" |
32 | | - android:layout_height="match_parent" |
33 | | - android:gravity="center_horizontal" |
34 | | - android:paddingRight="@dimen/activity_horizontal_margin" |
35 | | - android:paddingEnd="@dimen/activity_horizontal_margin" |
36 | | - android:paddingLeft="@dimen/activity_horizontal_margin" |
37 | | - android:paddingStart="@dimen/activity_horizontal_margin" |
38 | | - android:paddingTop="@dimen/activity_vertical_margin" |
39 | | - android:paddingBottom="@dimen/activity_vertical_margin" |
40 | | - /> |
41 | | -</FrameLayout> |
| 28 | + android:layout_height="wrap_content" |
| 29 | + android:layout_alignParentTop="true" |
| 30 | + android:background="?attr/colorPrimary" |
| 31 | + android:orientation="vertical"> |
| 32 | + <android.support.v7.widget.Toolbar |
| 33 | + android:id="@+id/toolbar" |
| 34 | + android:layout_height="?attr/actionBarSize" |
| 35 | + android:layout_width="match_parent" |
| 36 | + android:elevation="0dp" |
| 37 | + app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" |
| 38 | + app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/> |
| 39 | + <ImageView |
| 40 | + android:layout_width="match_parent" |
| 41 | + android:layout_height="?attr/listPreferredItemHeight" |
| 42 | + android:layout_gravity="center" |
| 43 | + android:scaleType="center" |
| 44 | + android:src="@drawable/ic_logo" |
| 45 | + android:contentDescription="@string/app_name"/> |
| 46 | + </LinearLayout> |
| 47 | +</RelativeLayout> |
0 commit comments