Переглянути джерело

Added sections toolbar. Added menu placeholder.

seavenois 10 роки тому
батько
коміт
1db0324939

+ 11 - 14
app/src/main/java/com/ivalentin/margolariak/MainActivity.java

@@ -18,6 +18,7 @@ import android.os.Bundle;
 import android.util.Log;
 import android.view.Gravity;
 import android.view.KeyEvent;
+import android.view.MenuInflater;
 import android.view.View;
 import android.view.Window;
 import android.view.View.OnClickListener;
@@ -26,6 +27,7 @@ import android.widget.Button;
 import android.widget.ImageButton;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
+import android.widget.PopupMenu;
 import android.widget.ProgressBar;
 import android.widget.RelativeLayout;
 import android.widget.ScrollView;
@@ -39,12 +41,17 @@ import android.widget.TextView;
  */
 public class MainActivity extends Activity{
 
-	//The main layout of the app
-	private MainLayout mLayout;
-
 	//Alarm to get location and notifications.
 	private AlarmReceiver alarm;
 
+	//Not referenced in code.
+	public void showMenu(View v) {
+		PopupMenu popup = new PopupMenu(this, v);
+		MenuInflater inflater = popup.getMenuInflater();
+		inflater.inflate(R.menu.menu, popup.getMenu());
+		popup.show();
+	}
+
 	/**
 	 * Loads a section in the main screen.
 	 * 
@@ -187,17 +194,7 @@ public class MainActivity extends Activity{
 	    
 	    //Set layout.
 		setContentView(R.layout.activity_main);
-		//mLayout = (MainLayout) findViewById(R.id.main_layout);
 
-
-		
-		//Assign menu button
-		ImageButton btMenu = (ImageButton) findViewById(R.id.bt_menu); 
-		btMenu.setOnClickListener(new OnClickListener() {
-			@Override
-			public void onClick(View v) { mLayout.toggleMenu(); }
-		});
-		
 		//Assign menu items
 		RelativeLayout menuItem[] = new RelativeLayout[6];
 		menuItem[0] = (RelativeLayout) findViewById(R.id.rl_menu_home);
@@ -586,7 +583,7 @@ public class MainActivity extends Activity{
 	@Override
 	public boolean onKeyUp(int keyCode, KeyEvent event) {
 		if (keyCode == KeyEvent.KEYCODE_MENU) {
-			mLayout.toggleMenu();
+			//mLayout.toggleMenu();
 			return true;
 		}
 		return super.onKeyUp(keyCode, event);

+ 0 - 265
app/src/main/java/com/ivalentin/margolariak/MainLayout.java

@@ -1,265 +0,0 @@
-package com.ivalentin.margolariak;
-
-import android.annotation.SuppressLint;
-import android.content.Context;
-import android.os.Handler;
-import android.util.AttributeSet;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.animation.Interpolator;
-import android.widget.LinearLayout;
-import android.widget.Scroller;
-
-/**
- * Extension of LinearLayout to be used in the app. Contains the slider menu.
- *
- * @author Iñigo Valentin
- *
- */
-public class MainLayout extends LinearLayout {
-
-	//The width of the view
-	private int mainLayoutWidth;
-
-	//The menu view
-	private View menu;
-
-	//The content view
-	private View content;
-
-	//The margin of the menu
-	private static int menuRightMargin = 25;
-
-	/**
-	 * Possible states of the menu
-	 */
-	private enum MenuState {
-		HIDING, HIDDEN, SHOWING, SHOWN,
-	}
-
-	private int contentXOffset;
-	private MenuState currentMenuState = MenuState.HIDDEN;
-	private final Scroller menuScroller = new Scroller(this.getContext(), new EaseInInterpolator());
-	private final Runnable menuRunnable = new MenuRunnable();
-	private final Handler menuHandler = new Handler();
-	private int prevX = 0;
-	private boolean isDragging = false;
-	private int initialX = 0;
-
-	/**
-	 * Constructor.
-	 *
-	 * @param context Context of the app.
-	 * @param attrs Atributes.
-	 */
-	public MainLayout(Context context, AttributeSet attrs) {
-		super(context, attrs);
-	}
-
-	/**
-	 * Constructor.
-	 *
-	 * @param context Context of the app.
-	 */
-	public MainLayout(Context context) {
-		super(context);
-	}
-
-	@Override
-	protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
-		super.onMeasure(widthMeasureSpec, heightMeasureSpec);
-
-		mainLayoutWidth = MeasureSpec.getSize(widthMeasureSpec);
-		menuRightMargin = mainLayoutWidth * 25 / 100;
-	}
-
-	@SuppressLint("ClickableViewAccessibility") //I don't need it.
-	@Override
-	protected void onAttachedToWindow() {
-		super.onAttachedToWindow();
-
-		menu = this.getChildAt(0);
-		content = this.getChildAt(1);
-		content.setOnTouchListener(new OnTouchListener() {
-			@Override
-			public boolean onTouch(View v, MotionEvent event) {
-				return MainLayout.this.onContentTouch(event);
-			}
-		});
-		menu.setVisibility(View.GONE);
-	}
-
-	@Override
-	protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
-		if (changed) {
-			LayoutParams contentLayoutParams = (LayoutParams) content.getLayoutParams();
-			contentLayoutParams.height = this.getHeight();
-			contentLayoutParams.width = this.getWidth();
-			LayoutParams menuLayoutParams = (LayoutParams) menu.getLayoutParams();
-			menuLayoutParams.height = this.getHeight();
-			menuLayoutParams.width = this.getWidth() - menuRightMargin;
-		}
-		this.requestDisallowInterceptTouchEvent(true);
-		menu.layout(left, top, right - menuRightMargin, bottom);
-		content.layout(left + contentXOffset, top, right + contentXOffset, bottom);
-
-	}
-
-	/**
-	 * Changes the menu state.
-	 * Closes it if it's open. Opens it if it's closed.
-	 */
-	public void toggleMenu() {
-		if (currentMenuState == MenuState.HIDING || currentMenuState == MenuState.SHOWING)
-			return;
-
-		switch (currentMenuState) {
-			case HIDDEN:
-				currentMenuState = MenuState.SHOWING;
-				menu.setVisibility(View.VISIBLE);
-				menuScroller.startScroll(0, 0, menu.getLayoutParams().width, 0, GM.MENU_SLIDING_DURATION);
-				break;
-			case SHOWN:
-				currentMenuState = MenuState.HIDING;
-				menuScroller.startScroll(contentXOffset, 0, -contentXOffset, 0, GM.MENU_SLIDING_DURATION);
-				break;
-			default:
-				break;
-		}
-		menuHandler.postDelayed(menuRunnable, GM.MENU_QUERY_INTERVAL);
-		this.invalidate();
-	}
-
-	/**
-	 * Handles the animation of the sliding menu.
-	 *
-	 * @author seavenois
-	 *
-	 * @see Runnable
-	 *
-	 */
-	private class MenuRunnable implements Runnable {
-		@Override
-		public void run() {
-			boolean isScrolling = menuScroller.computeScrollOffset();
-			adjustContentPosition(isScrolling);
-		}
-	}
-
-	/**
-	 * Moves the content view when the menu is slided.
-	 *
-	 * @param isScrolling Indicates if the menu is being slided.
-	 */
-	private void adjustContentPosition(boolean isScrolling) {
-		int scrollerXOffset = menuScroller.getCurrX();
-
-		content.offsetLeftAndRight(scrollerXOffset - contentXOffset);
-
-		contentXOffset = scrollerXOffset;
-		this.invalidate();
-		if (isScrolling)
-			menuHandler.postDelayed(menuRunnable, GM.MENU_QUERY_INTERVAL);
-		else
-			this.onMenuSlidingComplete();
-	}
-
-	/**
-	 * Called when the menu has been slided completely.
-	 * Fixes the position.
-	 */
-	private void onMenuSlidingComplete() {
-		switch (currentMenuState) {
-			case SHOWING:
-				currentMenuState = MenuState.SHOWN;
-				break;
-			case HIDING:
-				currentMenuState = MenuState.HIDDEN;
-				menu.setVisibility(View.GONE);
-				break;
-		}
-	}
-
-	/**
-	 * Defines the menu animation frame rate.
-	 *
-	 * @author Iñigo Valentin
-	 *
-	 */
-	private class EaseInInterpolator implements Interpolator {
-		@Override
-		public float getInterpolation(float t) {
-			return (float) Math.pow(t - 1, 5) + 1;
-		}
-
-	}
-
-	/**
-	 * Register touch events.
-	 * Used to show and hide the menu.
-	 *
-	 * @param event The MotionEvent triggering it.
-	 * @return True if the menu is fully opened or closed and a touch event is happening
-	 */
-	private boolean onContentTouch(MotionEvent event) {
-		if (currentMenuState == MenuState.HIDING || currentMenuState == MenuState.SHOWING)
-			return false;
-		int curX = (int) event.getRawX();
-		int diffX;
-
-		switch (event.getAction()) {
-			case MotionEvent.ACTION_DOWN:
-				prevX = curX;
-				initialX = curX;
-				return true;
-
-			case MotionEvent.ACTION_MOVE:
-				//int width = this.getWidth();
-				//if (event.getX() <  (float) width / 4){
-
-				if (!isDragging) {
-
-					isDragging = true;
-					menu.setVisibility(View.VISIBLE);
-				}
-				diffX = curX - prevX;
-				if (contentXOffset + diffX <= 0) {
-					diffX = -contentXOffset;
-				}
-				else if (contentXOffset + diffX > mainLayoutWidth - menuRightMargin) {
-					diffX = mainLayoutWidth - menuRightMargin - contentXOffset;
-				}
-				content.offsetLeftAndRight(diffX);
-				contentXOffset += diffX;
-				this.invalidate();
-
-				prevX = curX;
-				//}
-				return true;
-
-			case MotionEvent.ACTION_UP:
-				if (initialX != curX && currentMenuState == MenuState.HIDDEN) {
-					currentMenuState = MenuState.SHOWING;
-					menuScroller.startScroll(contentXOffset, 0,	menu.getLayoutParams().width - contentXOffset, 0, GM.MENU_SLIDING_DURATION);
-				}
-				else if (initialX != curX && currentMenuState == MenuState.SHOWN) {
-
-					currentMenuState = MenuState.HIDING;
-					menuScroller.startScroll(contentXOffset, 0, -contentXOffset, 0, GM.MENU_SLIDING_DURATION);
-				}
-				menuHandler.postDelayed(menuRunnable, GM.MENU_QUERY_INTERVAL);
-				this.invalidate();
-				isDragging = false;
-				prevX = 0;
-				return true;
-
-			default:
-				break;
-		}
-
-
-
-		return false;
-	}
-}
-

+ 0 - 1
app/src/main/java/com/ivalentin/margolariak/Sync.java

@@ -227,7 +227,6 @@ class Sync extends AsyncTask<Void, Void, Void> {
 			fu.Run(GM.SERVER + "/app/sync.php?os=android&code=" + code + "&fg=" + fg + "&v=" + dbVersion + "&lang=" + GM.getLang());
 			//All the info
 			o = fu.getOutput().toString();
-			Log.e("SYNC", o);
 			publishProgress();
 		}
 		catch(Exception ex){

+ 223 - 230
app/src/main/res/layout/activity_main.xml

@@ -1,12 +1,12 @@
-<LinearLayout
+<ScrollView
 	xmlns:android="http://schemas.android.com/apk/res/android"
-	xmlns:tools="http://schemas.android.com/tools"
 	android:layout_width="match_parent"
-	android:layout_height="match_parent"
-	tools:ignore="MergeRootFrame"
-	android:orientation="vertical">
+	android:layout_height="wrap_content">
 
-				<!-- The action bar -->
+	<LinearLayout
+		android:layout_width="match_parent"
+		android:layout_height="wrap_content"
+		android:orientation="vertical">
 
 		<LinearLayout
 			android:layout_width="fill_parent"
@@ -18,20 +18,17 @@
 
 			<!-- Button to open slider menu -->
 
-			<ImageButton
-				android:id="@+id/bt_menu"
+			<ImageView
+				android:contentDescription="@string/app_name"
 				android:layout_width="40dp"
 				android:layout_height="40dp"
+				android:id="@+id/iv_logo"
+				android:src="@drawable/ic_launcher"
+				android:adjustViewBounds="true"
 				android:layout_weight=".2"
-				android:adjustViewBounds="false"
-				android:background="#00000000"
-				android:contentDescription="@string/app_name"
-				android:maxHeight="20dp"
-				android:maxWidth="20dp"
-				android:scaleType="fitCenter"
-				android:src="@drawable/menu"
-				android:padding="2dp"
-				android:alpha=".5"/>
+				android:maxHeight="45dp"
+				android:maxWidth="45dp"
+				android:padding="1dp"/>
 
 			<!-- Layout with the app title and current section -->
 
@@ -65,16 +62,12 @@
 
 			</LinearLayout>
 
-			<ImageView
-				android:layout_width="40dp"
-				android:layout_height="40dp"
-				android:id="@+id/iv_logo"
-				android:src="@drawable/ic_launcher"
-				android:adjustViewBounds="true"
-				android:layout_weight=".2"
-				android:maxHeight="45dp"
-				android:maxWidth="45dp"
-				android:padding="1dp"/>
+			<ImageButton
+				android:layout_width="wrap_content"
+				android:layout_height="wrap_content"
+				android:src="@drawable/abc_ic_menu_moreoverflow_mtrl_alpha"
+				android:contentDescription="@string/tutorial_menu"
+				android:onClick="showMenu" />
 
 			<ProgressBar
 				android:id="@+id/pb_sync"
@@ -89,213 +82,213 @@
 
 		<!-- The part where the fragments will be loaded -->
 
-	<HorizontalScrollView
-		android:layout_width="wrap_content"
-		android:layout_height="wrap_content"
-		android:id="@+id/horizontalScrollView">
-
-		<LinearLayout
-			android:orientation="horizontal"
-			android:layout_width="match_parent"
-			android:layout_height="match_parent"
-			android:background="#000000">
-
-			<RelativeLayout
-				android:orientation="vertical"
-				android:layout_width="100dp"
-				android:layout_height="30dp"
-				android:background="#ffffff"
-				android:layout_margin="1dp"
-				android:id="@+id/rl_menu_home">
+		<HorizontalScrollView
+			android:layout_width="wrap_content"
+			android:layout_height="50dp"
+			android:id="@+id/horizontalScrollView"
+			android:scrollIndicators="none"
+			android:background="@color/background_bar_gradient">
 
-				<TextView
-					android:layout_width="wrap_content"
-					android:layout_height="wrap_content"
-					android:textAppearance="?android:attr/textAppearanceMedium"
-					android:text="@string/menu_home"
-					android:layout_gravity="top"
-					android:layout_centerHorizontal="true"
-					android:textSize="15sp"/>
-
-				<ImageView
-					android:layout_width="match_parent"
-					android:layout_height="8dp"
-					android:id="@+id/iv_menu_home"
-					android:background="#0000dd"
-					android:alpha="1"
-					android:layout_gravity="bottom"
-					android:layout_alignParentStart="false"
-					android:layout_alignParentEnd="false"
-					android:layout_alignParentLeft="false"
-					android:layout_alignParentRight="false"
-					android:layout_alignParentBottom="true"/>
-			</RelativeLayout>
-
-			<RelativeLayout
-				android:orientation="vertical"
-				android:layout_width="100dp"
-				android:layout_height="30dp"
-				android:background="#ffffff"
-				android:layout_margin="1dp"
-				android:id="@+id/rl_menu_location">
-
-				<TextView
-					android:layout_width="wrap_content"
-					android:layout_height="wrap_content"
-					android:textAppearance="?android:attr/textAppearanceMedium"
-					android:text="@string/menu_location"
-					android:layout_gravity="top"
-					android:layout_centerHorizontal="true"
-					android:textSize="15sp"/>
-
-				<ImageView
-					android:layout_width="match_parent"
-					android:layout_height="2dp"
-					android:id="@+id/iv_menu_location"
-					android:background="#0000dd"
-					android:alpha="1"
-					android:layout_gravity="bottom"
-					android:layout_alignParentStart="false"
-					android:layout_alignParentEnd="false"
-					android:layout_alignParentLeft="false"
-					android:layout_alignParentRight="false"
-					android:layout_alignParentBottom="true"/>
-			</RelativeLayout>
-
-			<RelativeLayout
-				android:orientation="vertical"
-				android:layout_width="100dp"
-				android:layout_height="30dp"
-				android:background="#ffffff"
-				android:layout_margin="1dp"
-				android:id="@+id/rl_menu_lablanca">
-
-				<TextView
-					android:layout_width="wrap_content"
-					android:layout_height="wrap_content"
-					android:textAppearance="?android:attr/textAppearanceMedium"
-					android:text="@string/menu_lablanca"
-					android:layout_gravity="top"
-					android:layout_centerHorizontal="true"
-					android:textSize="15sp"/>
-
-				<ImageView
-					android:layout_width="match_parent"
-					android:layout_height="2dp"
-					android:id="@+id/iv_menu_lablanca"
-					android:background="#0000dd"
-					android:alpha="1"
-					android:layout_gravity="bottom"
-					android:layout_alignParentStart="false"
-					android:layout_alignParentEnd="false"
-					android:layout_alignParentLeft="false"
-					android:layout_alignParentRight="false"
-					android:layout_alignParentBottom="true"/>
-			</RelativeLayout>
-
-			<RelativeLayout
-				android:orientation="vertical"
-				android:layout_width="100dp"
-				android:layout_height="30dp"
-				android:background="#ffffff"
-				android:layout_margin="1dp"
-				android:id="@+id/rl_menu_activities">
-
-				<TextView
-					android:layout_width="wrap_content"
-					android:layout_height="wrap_content"
-					android:textAppearance="?android:attr/textAppearanceMedium"
-					android:text="@string/menu_activities"
-					android:layout_gravity="top"
-					android:layout_centerHorizontal="true"
-					android:textSize="15sp"/>
-
-				<ImageView
-					android:layout_width="match_parent"
-					android:layout_height="2dp"
-					android:id="@+id/iv_menu_activities"
-					android:background="#0000dd"
-					android:alpha="1"
-					android:layout_gravity="bottom"
-					android:layout_alignParentStart="false"
-					android:layout_alignParentEnd="false"
-					android:layout_alignParentLeft="false"
-					android:layout_alignParentRight="false"
-					android:layout_alignParentBottom="true"/>
-			</RelativeLayout>
-
-			<RelativeLayout
-				android:orientation="vertical"
-				android:layout_width="100dp"
-				android:layout_height="30dp"
-				android:background="#ffffff"
-				android:layout_margin="1dp"
-				android:id="@+id/rl_menu_blog">
-
-				<TextView
-					android:layout_width="wrap_content"
-					android:layout_height="wrap_content"
-					android:textAppearance="?android:attr/textAppearanceMedium"
-					android:text="@string/menu_blog"
-					android:layout_gravity="top"
-					android:layout_centerHorizontal="true"
-					android:textSize="15sp"/>
-
-				<ImageView
-					android:layout_width="match_parent"
-					android:layout_height="2dp"
-					android:id="@+id/iv_menu_blog"
-					android:background="#0000dd"
-					android:alpha="1"
-					android:layout_gravity="bottom"
-					android:layout_alignParentStart="false"
-					android:layout_alignParentEnd="false"
-					android:layout_alignParentLeft="false"
-					android:layout_alignParentRight="false"
-					android:layout_alignParentBottom="true"/>
-			</RelativeLayout>
-
-			<RelativeLayout
-				android:orientation="vertical"
-				android:layout_width="100dp"
-				android:layout_height="30dp"
-				android:background="#ffffff"
-				android:layout_margin="1dp"
-				android:id="@+id/rl_menu_gallery">
-
-				<TextView
-					android:layout_width="wrap_content"
-					android:layout_height="wrap_content"
-					android:textAppearance="?android:attr/textAppearanceMedium"
-					android:text="@string/menu_gallery"
-					android:layout_gravity="top"
-					android:layout_centerHorizontal="true"
-					android:textSize="15sp"/>
-
-				<ImageView
-					android:layout_width="match_parent"
-					android:layout_height="2dp"
-					android:id="@+id/iv_menu_gallery"
-					android:background="#0000dd"
-					android:alpha="1"
-					android:layout_gravity="bottom"
-					android:layout_alignParentStart="false"
-					android:layout_alignParentEnd="false"
-					android:layout_alignParentLeft="false"
-					android:layout_alignParentRight="false"
-					android:layout_alignParentBottom="true"/>
-			</RelativeLayout>
+			<LinearLayout
+				android:orientation="horizontal"
+				android:layout_width="wrap_content"
+				android:layout_height="match_parent"
+				>
+
+				<RelativeLayout
+					android:orientation="vertical"
+					android:layout_width="100dp"
+					android:layout_height="match_parent"
+					android:id="@+id/rl_menu_home"
+					android:layout_marginRight="0.5dp"
+					android:layout_marginLeft="0.5dp">
+
+					<TextView
+						android:layout_width="wrap_content"
+						android:layout_height="wrap_content"
+						android:textAppearance="?android:attr/textAppearanceMedium"
+						android:text="@string/menu_home"
+						android:layout_gravity="top"
+						android:textSize="15sp"
+						android:layout_centerInParent="true"/>
+
+					<ImageView
+						android:layout_width="match_parent"
+						android:layout_height="8dp"
+						android:id="@+id/iv_menu_home"
+						android:background="#0000dd"
+						android:alpha="1"
+						android:layout_gravity="bottom"
+						android:layout_alignParentStart="false"
+						android:layout_alignParentEnd="false"
+						android:layout_alignParentLeft="false"
+						android:layout_alignParentRight="false"
+						android:layout_alignParentBottom="true"/>
+				</RelativeLayout>
+
+				<RelativeLayout
+					android:orientation="vertical"
+					android:layout_width="100dp"
+					android:layout_height="match_parent"
+					android:id="@+id/rl_menu_location"
+					android:layout_marginLeft="1dp"
+					android:layout_marginRight="1dp">
+
+					<TextView
+						android:layout_width="wrap_content"
+						android:layout_height="wrap_content"
+						android:textAppearance="?android:attr/textAppearanceMedium"
+						android:text="@string/menu_location"
+						android:layout_gravity="top"
+						android:textSize="15sp"
+						android:layout_centerInParent="true"/>
+
+					<ImageView
+						android:layout_width="match_parent"
+						android:layout_height="2dp"
+						android:id="@+id/iv_menu_location"
+						android:background="#0000dd"
+						android:alpha="1"
+						android:layout_gravity="bottom"
+						android:layout_alignParentStart="false"
+						android:layout_alignParentEnd="false"
+						android:layout_alignParentLeft="false"
+						android:layout_alignParentRight="false"
+						android:layout_alignParentBottom="true"/>
+				</RelativeLayout>
+
+				<RelativeLayout
+					android:orientation="vertical"
+					android:layout_width="100dp"
+					android:layout_height="match_parent"
+					android:id="@+id/rl_menu_lablanca"
+					android:layout_marginLeft="1dp"
+					android:layout_marginRight="1dp">
+
+					<TextView
+						android:layout_width="wrap_content"
+						android:layout_height="wrap_content"
+						android:textAppearance="?android:attr/textAppearanceMedium"
+						android:text="@string/menu_lablanca"
+						android:layout_gravity="top"
+						android:textSize="15sp"
+						android:layout_centerInParent="true"/>
+
+					<ImageView
+						android:layout_width="match_parent"
+						android:layout_height="2dp"
+						android:id="@+id/iv_menu_lablanca"
+						android:background="#0000dd"
+						android:alpha="1"
+						android:layout_gravity="bottom"
+						android:layout_alignParentStart="false"
+						android:layout_alignParentEnd="false"
+						android:layout_alignParentLeft="false"
+						android:layout_alignParentRight="false"
+						android:layout_alignParentBottom="true"/>
+				</RelativeLayout>
+
+				<RelativeLayout
+					android:orientation="vertical"
+					android:layout_width="100dp"
+					android:layout_height="match_parent"
+					android:id="@+id/rl_menu_activities"
+					android:layout_marginLeft="1dp"
+					android:layout_marginRight="1dp">
+
+					<TextView
+						android:layout_width="wrap_content"
+						android:layout_height="wrap_content"
+						android:textAppearance="?android:attr/textAppearanceMedium"
+						android:text="@string/menu_activities"
+						android:layout_gravity="top"
+						android:textSize="15sp"
+						android:layout_centerInParent="true"/>
+
+					<ImageView
+						android:layout_width="match_parent"
+						android:layout_height="2dp"
+						android:id="@+id/iv_menu_activities"
+						android:background="#0000dd"
+						android:alpha="1"
+						android:layout_gravity="bottom"
+						android:layout_alignParentStart="false"
+						android:layout_alignParentEnd="false"
+						android:layout_alignParentLeft="false"
+						android:layout_alignParentRight="false"
+						android:layout_alignParentBottom="true"/>
+				</RelativeLayout>
+
+				<RelativeLayout
+					android:orientation="vertical"
+					android:layout_width="100dp"
+					android:layout_height="match_parent"
+					android:id="@+id/rl_menu_blog"
+					android:layout_marginLeft="1dp"
+					android:layout_marginRight="1dp">
+
+					<TextView
+						android:layout_width="wrap_content"
+						android:layout_height="wrap_content"
+						android:textAppearance="?android:attr/textAppearanceMedium"
+						android:text="@string/menu_blog"
+						android:layout_gravity="top"
+						android:textSize="15sp"
+						android:layout_centerInParent="true"/>
+
+					<ImageView
+						android:layout_width="match_parent"
+						android:layout_height="2dp"
+						android:id="@+id/iv_menu_blog"
+						android:background="#0000dd"
+						android:alpha="1"
+						android:layout_gravity="bottom"
+						android:layout_alignParentStart="false"
+						android:layout_alignParentEnd="false"
+						android:layout_alignParentLeft="false"
+						android:layout_alignParentRight="false"
+						android:layout_alignParentBottom="true"/>
+				</RelativeLayout>
+
+				<RelativeLayout
+					android:orientation="vertical"
+					android:layout_width="100dp"
+					android:layout_height="match_parent"
+					android:id="@+id/rl_menu_gallery"
+					android:layout_marginLeft="1dp"
+					android:layout_marginRight="1dp">
+
+					<TextView
+						android:layout_width="wrap_content"
+						android:layout_height="wrap_content"
+						android:textAppearance="?android:attr/textAppearanceMedium"
+						android:text="@string/menu_gallery"
+						android:layout_gravity="top"
+						android:textSize="15sp"
+						android:layout_centerInParent="true"/>
+
+					<ImageView
+						android:layout_width="match_parent"
+						android:layout_height="2dp"
+						android:id="@+id/iv_menu_gallery"
+						android:background="#0000dd"
+						android:alpha="1"
+						android:layout_gravity="bottom"
+						android:layout_alignParentStart="false"
+						android:layout_alignParentEnd="false"
+						android:layout_alignParentLeft="false"
+						android:layout_alignParentRight="false"
+						android:layout_alignParentBottom="true"/>
+				</RelativeLayout>
 
-		</LinearLayout>
-	</HorizontalScrollView>
+			</LinearLayout>
+		</HorizontalScrollView>
 
-	<FrameLayout
+		<FrameLayout
 			android:id="@+id/activity_main_content_fragment"
 			android:layout_width="match_parent"
-			android:layout_height="match_parent"
-			android:layout_marginLeft="9dp"
-			android:layout_marginRight="9dp">
+			android:layout_height="match_parent">
 
 		</FrameLayout>
-
-</LinearLayout>
+	</LinearLayout>
+</ScrollView>

+ 12 - 0
app/src/main/res/menu/menu.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+    <item
+        android:id="@+id/file"
+        android:title="@string/pop_menu_about" />
+    <item
+        android:id="@+id/create_new"
+        android:title="@string/pop_menu_sponsors" />
+    <item
+        android:id="@+id/open"
+        android:title="@string/pop_menu_settings" />
+</menu>

+ 6 - 0
app/src/main/res/values/strings.xml

@@ -179,6 +179,12 @@
 
 	<!-- Misc strings -->
 
+
+	<!-- Pop-up menu entry strings -->
+	<string name="pop_menu_settings">Settings</string>
+	<string name="pop_menu_about">About us</string>
+	<string name="pop_menu_sponsors">Sponsors</string>
+
 	<string name="eur" translatable="false">€</string>
 	
 </resources>