Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
likorn
/
Lavina
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a47bafc7
authored
May 14, 2018
by
Paktalin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed logic of submitting order
parent
845443a8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
98 additions
and
8 deletions
app/src/main/java/com/example/paktalin/lavina/MapActivity.java
app/src/main/java/com/example/paktalin/lavina/adapters/WineAdapterMain.java
app/src/main/res/drawable/map_cut.jpg
app/src/main/res/layout/activity_map.xml
app/src/main/res/layout/activity_order_details.xml
app/src/main/java/com/example/paktalin/lavina/MapActivity.java
View file @
a47bafc7
package
com
.
example
.
paktalin
.
lavina
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.support.v7.app.AppCompatActivity
;
import
android.view.View
;
/**
* Created by Paktalin on 07/05/2018.
...
...
@@ -13,5 +15,13 @@ public class MapActivity extends AppCompatActivity {
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_map
);
(
findViewById
(
R
.
id
.
button_ok
)).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
Intent
intent
=
new
Intent
(
MapActivity
.
this
,
OrderDetailsActivity
.
class
);
startActivity
(
intent
);
}
});
}
}
app/src/main/java/com/example/paktalin/lavina/adapters/WineAdapterMain.java
View file @
a47bafc7
...
...
@@ -9,7 +9,7 @@ import android.widget.BaseAdapter;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
com.example.paktalin.lavina.Ma
in
Activity
;
import
com.example.paktalin.lavina.Ma
p
Activity
;
import
com.example.paktalin.lavina.R
;
import
com.example.paktalin.lavina.WineBottle
;
...
...
@@ -61,7 +61,7 @@ public class WineAdapterMain extends BaseAdapter {
convertView
.
findViewById
(
R
.
id
.
button_order
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
Intent
intent
=
new
Intent
(
context
,
Ma
in
Activity
.
class
);
Intent
intent
=
new
Intent
(
context
,
Ma
p
Activity
.
class
);
context
.
startActivity
(
intent
);
}
});
...
...
app/src/main/res/drawable/map_cut.jpg
0 → 100644
View file @
a47bafc7
184 KB
app/src/main/res/layout/activity_map.xml
View file @
a47bafc7
...
...
@@ -41,7 +41,9 @@
<RelativeLayout
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_margin=
"20dp"
>
android:layout_margin=
"20dp"
android:layout_toEndOf=
"@+id/image"
android:layout_toRightOf=
"@+id/image"
>
<TextView
android:id=
"@+id/restaurant_name"
...
...
@@ -69,11 +71,21 @@
</RelativeLayout>
<ImageView
android:id=
"@+id/image"
android:layout_width=
"180dp"
android:layout_height=
"wrap_content"
android:background=
"@drawable/wine_info1"
/>
<Button
android:id=
"@+id/button_ok"
android:layout_width=
"10dp"
android:layout_height=
"20dp"
android:background=
"@drawable/arrow_right"
android:layout_alignParentEnd=
"true"
android:layout_alignParentRight=
"true"
android:background=
"@drawable/wine_info1"
/>
android:layout_centerVertical=
"true"
android:layout_marginEnd=
"20dp"
android:layout_marginRight=
"20dp"
/>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/activity_order_details.xml
View file @
a47bafc7
<?xml version="1.0" encoding="utf-8"?>
<
android.support.constraint.Constraint
Layout
<
Relative
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
android:background=
"@drawable/red_background"
>
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
<RelativeLayout
android:id=
"@+id/header"
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:background=
"@android:color/transparent"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Order details"
android:textColor=
"@android:color/white"
android:layout_centerHorizontal=
"true"
android:layout_centerVertical=
"true"
android:textSize=
"20dp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@id/header"
android:background=
"@android:color/white"
>
<TextView
android:id=
"@+id/grab_order"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"Grab your order in Meat & Wine withing two days"
android:textColor=
"@color/colorPrimaryDark"
android:layout_centerHorizontal=
"true"
android:padding=
"10dp"
/>
<ImageView
android:id=
"@+id/map"
android:layout_width=
"match_parent"
android:layout_height=
"150dp"
android:src=
"@drawable/map_cut"
android:layout_below=
"@id/grab_order"
/>
<RelativeLayout
android:id=
"@+id/order_info"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
</RelativeLayout>
<TextView
android:id=
"@+id/title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/map"
android:text=
"Langhe Nebbiolo Bric Cenciurio 2016"
/>
<TextView
android:id=
"@+id/price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/map"
android:text=
"€13.50"
/>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment