Grundaufbau der App
[DHBWCampusApp.git] / app / src / main / res / layout / app_bar_campus_app.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
3     xmlns:app="http://schemas.android.com/apk/res-auto"
4     xmlns:tools="http://schemas.android.com/tools"
5     android:layout_width="match_parent"
6     android:layout_height="match_parent"
7     android:fitsSystemWindows="true"
8     tools:context="de.dhbwloe.campusapp.CampusApp">
9
10     <android.support.design.widget.AppBarLayout
11         android:layout_width="match_parent"
12         android:layout_height="wrap_content"
13         android:theme="@style/AppTheme.AppBarOverlay">
14
15         <android.support.v7.widget.Toolbar
16             android:id="@+id/toolbar"
17             android:layout_width="match_parent"
18             android:layout_height="?attr/actionBarSize"
19             android:background="?attr/colorPrimary"
20             app:popupTheme="@style/AppTheme.PopupOverlay">
21
22             <LinearLayout
23                 android:id="@+id/search_container"
24                 android:layout_width="match_parent"
25                 android:layout_height="match_parent"
26                 android:gravity="center_vertical"
27                 android:orientation="horizontal"
28                 android:visibility="gone">
29
30                 <EditText
31                     android:id="@+id/search_input"
32                     android:layout_width="0dp"
33                     android:layout_height="?attr/actionBarSize"
34                     android:layout_weight="1"
35                     android:background="@android:color/transparent"
36                     android:gravity="center_vertical"
37                     android:hint="Search"
38                     android:imeOptions="actionSearch"
39                     android:inputType="text"
40                     android:maxLines="1"
41                     android:paddingLeft="2dp"
42                     android:singleLine="true"
43                     android:textColor="#ffffff"
44                     android:textColorHint="#b3ffffff" />
45
46                 <ImageView
47                     android:id="@+id/search_clear"
48                     android:layout_width="wrap_content"
49                     android:layout_height="wrap_content"
50                     android:layout_gravity="center"
51                     android:src="@mipmap/ic_close_white"
52                     android:padding="16dp" />
53             </LinearLayout>
54
55             <LinearLayout
56                 android:id="@+id/title_container"
57                 android:layout_width="match_parent"
58                 android:layout_height="match_parent"
59                 android:gravity="center_vertical"
60                 android:orientation="horizontal"
61                 android:visibility="visible">
62
63                 <TextView
64                     android:layout_width="wrap_content"
65                     android:layout_height="wrap_content"
66                     android:textAppearance="?android:attr/textAppearanceLarge"
67                     android:text="{Title}"
68                     android:layout_weight="1"
69                     android:imeOptions="actionSearch"
70                     android:id="@+id/title" />
71
72                 <ImageView
73                     android:id="@+id/search_button"
74                     android:layout_width="wrap_content"
75                     android:layout_height="wrap_content"
76                     android:src="@mipmap/ic_search"
77                     android:padding="16dp" />
78             </LinearLayout>
79         </android.support.v7.widget.Toolbar>
80
81     </android.support.design.widget.AppBarLayout>
82
83     <include layout="@layout/content_campus_app" />
84
85 </android.support.design.widget.CoordinatorLayout>