Commit 08c783f1 authored by U-PEDSPC\Pedro's avatar U-PEDSPC\Pedro
Browse files

Merge branch 'master' of gitlab.doc.gold.ac.uk:pbran010/TravelBuddies

parents 3f55262c 3812e7a0
......@@ -25,6 +25,7 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.0'
testCompile 'junit:junit:4.12'
compile 'com.android.volley:volley:1.0.0'
compile 'com.android.support:design:25.1.0'
testCompile 'junit:junit:4.12'
}
......@@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="travelpals.travelpals">
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
......@@ -18,7 +18,13 @@
</intent-filter>
</activity>
<activity android:name=".RegisterActivity" />
<activity android:name=".UserAreaActivity"></activity>
<activity android:name=".UserAreaActivity" />
<activity android:name=".MainMenuActivity">
android:exported="true"
</activity>
<activity android:name=".SearchActivity" />
<activity android:name=".MyPlanActivity" />
<activity android:name=".MessageActivity"></activity>
</application>
</manifest>
\ No newline at end of file
package travelpals.travelpals;
import android.content.Intent;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import com.android.volley.Response;
import org.json.JSONException;
import org.json.JSONObject;
public class MainMenuActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main_menu);
final ImageButton ibMyPlanImageButton = (ImageButton) findViewById(R.id.ibMyPlanImageButton);
final ImageButton ibSearchImageButton = (ImageButton) findViewById(R.id.ibSearchImageButton);
final ImageButton ibMessageImageButton = (ImageButton) findViewById(R.id.ibMessageImageButton);
final ImageButton ibUserImageButton = (ImageButton) findViewById(R.id.ibUserImageButton);
ibUserImageButton.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v) {
Intent userIntent = new Intent(MainMenuActivity.this, UserAreaActivity.class);
MainMenuActivity.this.startActivity(userIntent);
}
});
ibSearchImageButton.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v) {
Intent searchIntent = new Intent(MainMenuActivity.this, SearchActivity.class);
MainMenuActivity.this.startActivity(searchIntent);
}
});
ibMessageImageButton.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v) {
Intent messageIntent = new Intent(MainMenuActivity.this, MessageActivity.class);
MainMenuActivity.this.startActivity(messageIntent);
}
});
ibMyPlanImageButton.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v) {
Intent myPlanIntent = new Intent(MainMenuActivity.this, MyPlanActivity.class);
MainMenuActivity.this.startActivity(myPlanIntent);
}
});
}
}
package travelpals.travelpals;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MessageActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_message);
}
}
package travelpals.travelpals;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MyPlanActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_my_plan);
}
}
package travelpals.travelpals;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class SearchActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_search);
}
}
......@@ -60,9 +60,10 @@ public class loginActivity extends AppCompatActivity {
intent.putExtra("age", age);
intent.putExtra("username", username);
loginActivity.this.startActivity(intent);
Intent intent1 = new Intent(loginActivity.this, MainMenuActivity.class);
//loginActivity.this.startActivity(intent);
loginActivity.this.startActivity(intent1); //Start main menu activity
}else{
AlertDialog.Builder builder = new AlertDialog.Builder(loginActivity.this);
......
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0" />
<path
android:fillColor="#FF000000"
android:pathData="M9,2L7.17,4H4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2H9zm3,15c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M22,16V4c0,-1.1 -0.9,-2 -2,-2H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2zm-11,-4l2.03,2.71L16,11l4,5H8l3,-4zM2,6v14c0,1.1 0.9,2 2,2h14v-2H4V6H2z" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M22.7,19l-9.1,-9.1c0.9,-2.3 0.4,-5 -1.5,-6.9 -2,-2 -5,-2.4 -7.4,-1.3L9,6 6,9 1.6,4.7C0.4,7.1 0.9,10.1 2.9,12.1c1.9,1.9 4.6,2.4 6.9,1.5l9.1,9.1c0.4,0.4 1,0.4 1.4,0l2.3,-2.3c0.5,-0.4 0.5,-1.1 0.1,-1.4z" />
</vector>
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92s-1.31,-2.92 -2.92,-2.92z" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M4,6H2v14c0,1.1 0.9,2 2,2h14v-2H4V6zm16,-4H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V4c0,-1.1 -0.9,-2 -2,-2zm-8,12.5v-9l6,4.5 -6,4.5z" />
</vector>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="135"
android:centerColor="#4CAF50"
android:endColor="#2E7D32"
android:startColor="#81C784"
android:type="linear" />
</shape>
\ No newline at end of file
<?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:id="@+id/activity_main_menu"
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"
tools:context="travelpals.travelpals.MainMenuActivity">
<ImageButton
android:layout_width="130dp"
android:layout_height="150dp"
android:scaleType="fitXY"
android:layout_marginTop="50dp"
android:layout_marginLeft="30dp"
app:srcCompat="@drawable/passportvector"
android:id="@+id/ibMyPlanImageButton" />
<ImageButton
android:layout_width="130dp"
android:layout_height="150dp"
android:scaleType="fitXY"
android:layout_marginTop="50dp"
android:layout_marginLeft="170dp"
app:srcCompat="@drawable/searchvector"
android:id="@+id/ibSearchImageButton" />
<ImageButton
android:layout_width="130dp"
android:layout_height="150dp"
android:scaleType="fitXY"
android:layout_marginTop="200dp"
android:layout_marginLeft="30dp"
app:srcCompat="@drawable/messagevector"
android:id="@+id/ibMessageImageButton" />
<ImageButton
android:layout_width="130dp"
android:layout_height="150dp"
android:scaleType="fitXY"
android:layout_marginTop="200dp"
android:layout_marginLeft="170dp"
app:srcCompat="@drawable/userprofilevector"
android:id="@+id/ibUserImageButton"
/>
<TextView
android:text="My Plan"
android:layout_width="120dp"
android:layout_height="20dp"
android:background="#000"
android:textColor="#fff"
android:textAlignment="center"
android:id="@+id/tvMyPlan"
android:layout_alignBottom="@+id/ibMyPlanImageButton"
android:layout_alignEnd="@+id/ibMyPlanImageButton"
android:layout_alignStart="@+id/ibMyPlanImageButton" />
</RelativeLayout>
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