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
845443a8
authored
May 14, 2018
by
Paktalin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
order details activity created
parent
dc9497ac
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
0 deletions
app/src/main/AndroidManifest.xml
app/src/main/java/com/example/paktalin/lavina/OrderDetailsActivity.java
app/src/main/java/com/example/paktalin/lavina/adapters/WineAdapterMain.java
app/src/main/res/layout/activity_order_details.xml
app/src/main/AndroidManifest.xml
View file @
845443a8
...
...
@@ -31,6 +31,7 @@
<activity
android:name=
".CollectionActivity"
/>
<activity
android:name=
".OrderActivity"
/>
<activity
android:name=
".QueryResultsActivity"
/>
<activity
android:name=
".OrderDetailsActivity"
/>
</application>
</manifest>
\ No newline at end of file
app/src/main/java/com/example/paktalin/lavina/OrderDetailsActivity.java
0 → 100644
View file @
845443a8
package
com
.
example
.
paktalin
.
lavina
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.support.v7.app.AppCompatActivity
;
/**
* Created by Paktalin on 14/05/2018.
*/
public
class
OrderDetailsActivity
extends
AppCompatActivity
{
@Override
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_order_details
);
}
}
app/src/main/java/com/example/paktalin/lavina/adapters/WineAdapterMain.java
View file @
845443a8
package
com
.
example
.
paktalin
.
lavina
.
adapters
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -8,6 +9,7 @@ import android.widget.BaseAdapter;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
com.example.paktalin.lavina.MainActivity
;
import
com.example.paktalin.lavina.R
;
import
com.example.paktalin.lavina.WineBottle
;
...
...
@@ -19,10 +21,12 @@ public class WineAdapterMain extends BaseAdapter {
private
LayoutInflater
inflater
;
private
WineBottle
[]
wines
;
Context
context
;
public
WineAdapterMain
(
Context
context
,
WineBottle
[]
wines
)
{
this
.
wines
=
wines
;
inflater
=
(
LayoutInflater
)
context
.
getSystemService
(
Context
.
LAYOUT_INFLATER_SERVICE
);
this
.
context
=
context
;
}
@Override
...
...
@@ -54,6 +58,14 @@ public class WineAdapterMain extends BaseAdapter {
((
TextView
)
convertView
.
findViewById
(
R
.
id
.
wine_shop
)).
setText
(
bottle
.
getPrice
());
((
ImageView
)
convertView
.
findViewById
(
R
.
id
.
wine_image
)).
setImageBitmap
(
bottle
.
getImage
());
convertView
.
findViewById
(
R
.
id
.
button_order
).
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
Intent
intent
=
new
Intent
(
context
,
MainActivity
.
class
);
context
.
startActivity
(
intent
);
}
});
return
convertView
;
}
...
...
app/src/main/res/layout/activity_order_details.xml
0 → 100644
View file @
845443a8
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
</android.support.constraint.ConstraintLayout>
\ 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