Commit 1447abca authored by Christof Wolke's avatar Christof Wolke
Browse files

adding menu

parent 127949bc
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="de.uni_oldenburg.bidl.home_view.MainActivity">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/noBeaconTV"
android:gravity="center"
android:visibility="invisible"/>
<GridView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:layout_margin="5dp"
android:stretchMode="columnWidth"
android:id="@+id/mainActivityGrid"
android:numColumns="2"
android:focusable="true"></GridView>
android:fitsSystemWindows="true"
tools:openDrawer="start">
<include
layout="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer" />
</android.support.constraint.ConstraintLayout>
</android.support.v4.widget.DrawerLayout>
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="de.uni_oldenburg.bidl.home_view.MainActivity">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<include layout="@layout/content_main" />
</android.support.design.widget.CoordinatorLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="de.uni_oldenburg.bidl.home_view.MainActivity"
tools:showIn="@layout/app_bar_main">
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="de.uni_oldenburg.bidl.home_view.MainActivity">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/noBeaconTV"
android:gravity="center"
android:visibility="invisible"/>
<GridView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:layout_margin="5dp"
android:stretchMode="columnWidth"
android:id="@+id/mainActivityGrid"
android:numColumns="2"
android:focusable="true"/>
</android.support.constraint.ConstraintLayout>
</RelativeLayout>
......@@ -12,6 +12,8 @@
android:gravity="center"
android:textSize="20sp"
android:layout_margin="10dp"
android:padding="20dp"/>
android:padding="20dp"
android:elevation="2dp"
android:singleLine="false"/>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/nav_header_height"
android:background="@color/blue"
android:gravity="center"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:theme="@style/ThemeOverlay.AppCompat.Dark">
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:src="@drawable/unilogoblue" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<group android:checkableBehavior="single">
<item
android:id="@+id/nav_search"
android:icon="@drawable/ic_search_black_24dp"
android:title="@string/menuSearchTitle" />
<item
android:id="@+id/nav_home"
android:icon="@drawable/ic_home_black_24dp"
android:title="@string/menuHomeTitle"/>
<item
android:id="@+id/nav_profil"
android:icon="@drawable/ic_perm_identity_black_24dp"
android:title="@string/menuProfilTitle" />
<item
android:id="@+id/nav_favorite"
android:icon="@drawable/ic_favorite_black_24dp"
android:title="@string/menuFavoriteTitle" />
<item
android:id="@+id/nav_logout"
android:icon="@drawable/ic_exit_to_app_black_24dp"
android:title="@string/menuLogoutTitle" />
</group>
<item android:title="Social Media">
<menu>
<item
android:id="@+id/nav_share"
android:icon="@drawable/ic_menu_share"
android:title="@string/menuShareTitle" />
</menu>
</item>
</menu>
<resources>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
</resources>
......@@ -5,6 +5,7 @@
<color name="colorAccent">#FF4081</color>
<color name="white">#FFFFFF</color>
<color name="grey">#c8c8ce</color>
<color name="blue">#00529E</color>
<color name="black_overlay">#66000000</color>
</resources>
......@@ -2,4 +2,8 @@
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="nav_header_vertical_spacing">16dp</dimen>
<dimen name="nav_header_height">160dp</dimen>
<dimen name="fab_margin">16dp</dimen>
</resources>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment