Commit c5e3bb9f by Paktalin

map activity finished (I hope)

parent 4aa0ba42
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:label="@string/title_activity_main" android:label="@string/title_activity_main"
android:theme="@style/AppTheme.NoActionBar"></activity> android:theme="@style/AppTheme.NoActionBar" />
<activity android:name=".MapActivity"/>
</application> </application>
</manifest> </manifest>
\ No newline at end of file
package com.example.paktalin.lavina; package com.example.paktalin.lavina;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.design.widget.FloatingActionButton; import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar; import android.support.design.widget.Snackbar;
...@@ -81,7 +82,8 @@ public class MainActivity extends AppCompatActivity ...@@ -81,7 +82,8 @@ public class MainActivity extends AppCompatActivity
int id = item.getItemId(); int id = item.getItemId();
if (id == R.id.map) { if (id == R.id.map) {
// Handle the camera action Intent intent = new Intent(MainActivity.this, MapActivity.class);
startActivity(intent);
} else if (id == R.id.wine) { } else if (id == R.id.wine) {
} else if (id == R.id.collection) { } else if (id == R.id.collection) {
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
...@@ -15,20 +13,19 @@ ...@@ -15,20 +13,19 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Find the nearest smart cellar" android:text="Nearby cellars"
android:textColor="@android:color/white" android:textColor="@android:color/white"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:textSize="16dp"/> android:textSize="20dp"/>
</RelativeLayout> </RelativeLayout>
<ImageView <ImageView
android:id="@+id/imageView2" android:id="@+id/imageView2"
android:layout_below="@+id/map_title" android:layout_below="@+id/map_title"
android:layout_width="match_parent" android:layout_width="400dp"
android:layout_height="match_parent" android:layout_height="match_parent"
app:srcCompat="@drawable/map_sample" android:background="@drawable/locationmap1"
android:layout_above="@+id/wine_info"/> android:layout_above="@+id/wine_info"/>
<RelativeLayout <RelativeLayout
...@@ -40,11 +37,42 @@ ...@@ -40,11 +37,42 @@
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:background="@color/colorPrimary"> android:background="@color/colorPrimary">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_margin="20dp">
<TextView
android:id="@+id/restaurant_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/restaurant_name"
android:textSize="22dp"
android:textColor="@android:color/white" />
<ImageView
android:id="@+id/stars"
android:layout_width="80dp"
android:layout_height="18dp"
android:layout_below="@id/restaurant_name"
android:layout_marginTop="5dp"
android:background="@drawable/stars_4_5_white"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="136 sorts available"
android:textColor="@android:color/white"
android:layout_marginBottom="10dp"
android:layout_alignParentBottom="true" />
</RelativeLayout>
<ImageView <ImageView
android:layout_width="70dp" android:layout_width="160dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:background="@drawable/wine_sample" /> android:layout_alignParentRight="true"
android:background="@drawable/wine_info1"/>
</RelativeLayout> </RelativeLayout>
</RelativeLayout> </RelativeLayout>
\ No newline at end of file
...@@ -21,4 +21,5 @@ ...@@ -21,4 +21,5 @@
<string name="navigation_drawer_close">Close navigation drawer</string> <string name="navigation_drawer_close">Close navigation drawer</string>
<string name="action_settings">Settings</string> <string name="action_settings">Settings</string>
<string name="restaurant_name"><![CDATA[Meat & Wine]]></string>
</resources> </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 sign in to comment