Commit 290872a1 authored by Christof Wolke's avatar Christof Wolke

menu for all activities

parent 319a52f9
......@@ -26,7 +26,7 @@ public class BaseActivity extends AppCompatActivity implements NavigationView.On
protected void setMenu() {
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
// setSupportActionBar(toolbar);
setSupportActionBar(toolbar);
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
......
......@@ -3,14 +3,16 @@ package de.uni_oldenburg.bidl.member_view;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import de.uni_oldenburg.bidl.BaseActivity;
import de.uni_oldenburg.bidl.R;
public class FeedbackActivity extends AppCompatActivity {
public class FeedbackActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_feedback);
setContentView(R.layout.activity_main);
setMenu();
setTitle(getIntent().getStringExtra("appName"));
}
}
......@@ -2,6 +2,7 @@ package de.uni_oldenburg.bidl.member_view;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.view.menu.MenuAdapter;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
......@@ -16,6 +17,7 @@ import classes.Event;
import classes.apps.forum.Comment;
import classes.apps.forum.CommentList;
import classes.apps.forum.Forum;
import de.uni_oldenburg.bidl.BaseActivity;
import de.uni_oldenburg.bidl.R;
import de.uni_oldenburg.bidl.listfragment.CommentListAdapter;
import de.uni_oldenburg.bidl.listfragment.ListCommunicator;
......@@ -24,7 +26,7 @@ import services.db.DBHelper;
import services.servercommunication.NetworkService;
public class ForumActivity extends AppCompatActivity implements ListCommunicator, View.OnTouchListener {
public class ForumActivity extends BaseActivity implements ListCommunicator, View.OnTouchListener {
/** Tag for Logging **/
private static final String TAG = ForumActivity.class.getSimpleName();
......@@ -38,8 +40,9 @@ public class ForumActivity extends AppCompatActivity implements ListCommunicator
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_forum);
setContentView(R.layout.activity_main);
setMenu();
setTitle(getIntent().getStringExtra("appName"));
event = DBHelper.getEvent();
getForumObjectFromServer(event.getEventId());
......
......@@ -3,10 +3,13 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="de.uni_oldenburg.bidl.member_view.FeedbackActivity">
tools:context="de.uni_oldenburg.bidl.member_view.FeedbackActivity"
tools:showIn="@layout/app_bar_main"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
</RelativeLayout>
......@@ -3,11 +3,14 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="de.uni_oldenburg.bidl.member_view.ForumActivity">
android:paddingTop="16dp"
tools:context="de.uni_oldenburg.bidl.member_view.ForumActivity"
tools:showIn="@layout/app_bar_main"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<FrameLayout
android:layout_width="fill_parent"
......
......@@ -21,7 +21,12 @@
</android.support.design.widget.AppBarLayout>
<include layout="@layout/content_main" />
<include layout="@layout/content_main" />
<include layout="@layout/activity_forum"/>
<include layout="@layout/activity_feedback"/>
</android.support.design.widget.CoordinatorLayout>
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
......@@ -10,6 +10,7 @@
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>
Markdown is supported
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