Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Booking App COM5007
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
austin.blanke
Booking App COM5007
Commits
67e195a8
Commit
67e195a8
authored
May 29, 2023
by
austin.blanke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Working On Booking Page
parent
c9c1871d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
107 additions
and
78 deletions
+107
-78
DatabaseConnector.java
...om/example/bookingapp_austinblanke/DatabaseConnector.java
+8
-22
moreinfo_activity.xml
app/src/main/res/layout/moreinfo_activity.xml
+99
-56
No files found.
app/src/main/java/com/example/bookingapp_austinblanke/DatabaseConnector.java
View file @
67e195a8
...
@@ -104,23 +104,6 @@ public class DatabaseConnector extends SQLiteOpenHelper {
...
@@ -104,23 +104,6 @@ public class DatabaseConnector extends SQLiteOpenHelper {
play1
.
put
(
COLUMN_STEPS
,
"false"
);
play1
.
put
(
COLUMN_STEPS
,
"false"
);
play1
.
put
(
COLUMN_TICSEAT
,
17
);
play1
.
put
(
COLUMN_TICSEAT
,
17
);
play1
.
put
(
COLUMN_TICSEATCOST
,
8
);
play1
.
put
(
COLUMN_TICSEATCOST
,
8
);
play1
.
put
(
COLUMN_TICSTAND
,
0
);
play1
.
put
(
COLUMN_TICSTANDCOST
,
0
);
play1
.
put
(
COLUMN_TICSTAGE
,
0
);
play1
.
put
(
COLUMN_TICSTAGECOST
,
0
);
play1
.
put
(
COLUMN_TICGRASS
,
0
);
play1
.
put
(
COLUMN_TICGRASSCOST
,
0
);
play1
.
put
(
COLUMN_TICBOATA
,
0
);
play1
.
put
(
COLUMN_TICBOATACOST
,
0
);
play1
.
put
(
COLUMN_TICBOATB
,
0
);
play1
.
put
(
COLUMN_TICBOATBCOST
,
0
);
play1
.
put
(
COLUMN_TICRIVERBANK
,
0
);
play1
.
put
(
COLUMN_TICRIVERBANKCOST
,
0
);
play1
.
put
(
COLUMN_TICINNERCIRCLE
,
0
);
play1
.
put
(
COLUMN_TICINNERCIRCLECOST
,
0
);
play1
.
put
(
COLUMN_TICOUTTERCIRCLE
,
0
);
play1
.
put
(
COLUMN_TICOUTTERCIRCLECOST
,
0
);
db
.
insert
(
TABLE_PERFORMANCES
,
null
,
play1
);
db
.
insert
(
TABLE_PERFORMANCES
,
null
,
play1
);
ContentValues
play2
=
new
ContentValues
();
ContentValues
play2
=
new
ContentValues
();
...
@@ -240,14 +223,16 @@ public class DatabaseConnector extends SQLiteOpenHelper {
...
@@ -240,14 +223,16 @@ public class DatabaseConnector extends SQLiteOpenHelper {
SQLiteDatabase
db
=
this
.
getWritableDatabase
();
SQLiteDatabase
db
=
this
.
getWritableDatabase
();
Cursor
cursor
=
db
.
rawQuery
(
query
,
null
);
Cursor
cursor
=
db
.
rawQuery
(
query
,
null
);
cursor
.
moveToFirst
();
cursor
.
moveToFirst
();
for
(
int
i
=
8
;
i
<
16
;
i
++
){
for
(
int
i
=
8
;
i
<
26
;
i
=
i
+
2
){
if
(
Integer
.
valueOf
((
cursor
.
getString
(
i
)))
!=
0
){
if
(
cursor
.
getString
(
i
)
!=
null
){
count
=
count
+
1
;
count
=
count
+
1
;
if
(
count
==
t
){
if
(
count
==
t
){
result
=
cursor
.
getString
(
i
+
1
)
.
toString
()
;
result
=
cursor
.
getString
(
i
+
1
);
}
}
}
}
}
}
if
(
result
==
null
)
{
result
=
""
;}
cursor
.
close
();
cursor
.
close
();
db
.
close
();
db
.
close
();
return
result
;
return
result
;
...
@@ -260,14 +245,15 @@ public class DatabaseConnector extends SQLiteOpenHelper {
...
@@ -260,14 +245,15 @@ public class DatabaseConnector extends SQLiteOpenHelper {
SQLiteDatabase
db
=
this
.
getWritableDatabase
();
SQLiteDatabase
db
=
this
.
getWritableDatabase
();
Cursor
cursor
=
db
.
rawQuery
(
query
,
null
);
Cursor
cursor
=
db
.
rawQuery
(
query
,
null
);
cursor
.
moveToFirst
();
cursor
.
moveToFirst
();
for
(
int
i
=
8
;
i
<
26
;
i
++
){
for
(
int
i
=
8
;
i
<
26
;
i
=
i
+
2
){
if
(
cursor
.
getString
(
i
)
!=
null
){
if
(
cursor
.
getString
(
i
)
!=
null
){
count
=
count
+
1
;
count
=
count
+
1
;
if
(
count
==
t
){
if
(
count
==
t
){
result
=
cursor
.
getString
(
i
+
1
)
.
toString
()
;
result
=
cursor
.
getString
(
i
+
1
);
}
}
}
}
}
}
if
(
result
==
null
||
result
==
"0"
)
{
result
=
""
;}
cursor
.
close
();
cursor
.
close
();
db
.
close
();
db
.
close
();
return
result
;
return
result
;
...
...
app/src/main/res/layout/moreinfo_activity.xml
View file @
67e195a8
...
@@ -5,6 +5,48 @@
...
@@ -5,6 +5,48 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
>
<EditText
android:id=
"@+id/bookTicket1Cnt"
android:layout_width=
"163dp"
android:layout_height=
"48dp"
android:ems=
"10"
android:hint=
"Input Ticket Count"
android:inputType=
"textPersonName"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.883"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.572"
/>
<EditText
android:id=
"@+id/bookTicket2Cnt"
android:layout_width=
"161dp"
android:layout_height=
"48dp"
android:ems=
"10"
android:hint=
"Input Ticket Count"
android:inputType=
"textPersonName"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.876"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.653"
/>
<EditText
android:id=
"@+id/bookTicket3Cnt"
android:layout_width=
"161dp"
android:layout_height=
"48dp"
android:ems=
"10"
android:hint=
"Input Ticket Count"
android:inputType=
"textPersonName"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.884"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.733"
/>
<Button
<Button
android:id=
"@+id/BookNow"
android:id=
"@+id/BookNow"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
@@ -29,7 +71,7 @@
...
@@ -29,7 +71,7 @@
app:layout_constraintHorizontal_bias=
"0.495"
app:layout_constraintHorizontal_bias=
"0.495"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.097
"
/>
app:layout_constraintVertical_bias=
"0.025
"
/>
<TextView
<TextView
android:id=
"@+id/date"
android:id=
"@+id/date"
...
@@ -39,13 +81,14 @@
...
@@ -39,13 +81,14 @@
android:textSize=
"24sp"
android:textSize=
"24sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.1
97
"
app:layout_constraintHorizontal_bias=
"0.1
8
"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.257"
/>
app:layout_constraintVertical_bias=
"0.181"
/>
<TextView
<TextView
android:id=
"@+id/
flash
"
android:id=
"@+id/
stairs
"
android:layout_width=
"107dp"
android:layout_width=
"107dp"
android:layout_height=
"39dp"
android:layout_height=
"39dp"
android:text=
"TextView"
android:text=
"TextView"
...
@@ -54,94 +97,94 @@
...
@@ -54,94 +97,94 @@
app:layout_constraintHorizontal_bias=
"0.799"
app:layout_constraintHorizontal_bias=
"0.799"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.
35
9"
/>
app:layout_constraintVertical_bias=
"0.
43
9"
/>
<TextView
<TextView
android:id=
"@+id/ti
ckets2
"
android:id=
"@+id/ti
me
"
android:layout_width=
"107dp"
android:layout_width=
"107dp"
android:layout_height=
"39dp"
android:layout_height=
"39dp"
android:text=
"TextView"
android:text=
"TextView"
android:textSize=
"24sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.
197
"
app:layout_constraintHorizontal_bias=
"0.
799
"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.547"
app:layout_constraintVertical_bias=
"0.18"
/>
tools:ignore=
"DuplicateIds"
/>
<TextView
<TextView
android:id=
"@+id/
tickets3
"
android:id=
"@+id/
flash
"
android:layout_width=
"107dp"
android:layout_width=
"107dp"
android:layout_height=
"39dp"
android:layout_height=
"39dp"
android:text=
"TextView"
android:text=
"TextView"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.
197
"
app:layout_constraintHorizontal_bias=
"0.
799
"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.619"
app:layout_constraintVertical_bias=
"0.283"
/>
tools:ignore=
"DuplicateIds"
/>
<TextView
<TextView
android:id=
"@+id/
tickets1
"
android:id=
"@+id/
wheelchair
"
android:layout_width=
"107dp"
android:layout_width=
"107dp"
android:layout_height=
"39dp"
android:layout_height=
"39dp"
android:text=
"TextView"
android:text=
"TextView"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.
197
"
app:layout_constraintHorizontal_bias=
"0.
799
"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.478"
app:layout_constraintVertical_bias=
"0.362"
/>
tools:ignore=
"DuplicateIds"
/>
<TextView
<TextView
android:id=
"@+id/stairs
"
android:id=
"@+id/location
"
android:layout_width=
"107
dp"
android:layout_width=
"145
dp"
android:layout_height=
"39
dp"
android:layout_height=
"55
dp"
android:text=
"TextView"
android:text=
"TextView"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.799
"
app:layout_constraintHorizontal_bias=
"0.15
"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.515"
/>
app:layout_constraintVertical_bias=
"0.289"
/>
<TextView
<TextView
android:id=
"@+id/
wheelchair
"
android:id=
"@+id/
tickets1
"
android:layout_width=
"1
07
dp"
android:layout_width=
"1
65
dp"
android:layout_height=
"
39
dp"
android:layout_height=
"
44
dp"
android:text=
"TextView"
android:text=
"TextView"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.
799
"
app:layout_constraintHorizontal_bias=
"0.
134
"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.439"
/>
app:layout_constraintVertical_bias=
"0.569"
tools:ignore=
"DuplicateIds"
/>
<TextView
<TextView
android:id=
"@+id/
location
"
android:id=
"@+id/
tickets3
"
android:layout_width=
"1
45
dp"
android:layout_width=
"1
67
dp"
android:layout_height=
"
55
dp"
android:layout_height=
"
46
dp"
android:text=
"TextView"
android:text=
"TextView"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.1
97
"
app:layout_constraintHorizontal_bias=
"0.1
35
"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.368"
/>
app:layout_constraintVertical_bias=
"0.731"
tools:ignore=
"DuplicateIds"
/>
<TextView
<TextView
android:id=
"@+id/ti
me
"
android:id=
"@+id/ti
ckets2
"
android:layout_width=
"1
0
7dp"
android:layout_width=
"1
6
7dp"
android:layout_height=
"
39
dp"
android:layout_height=
"
47
dp"
android:text=
"TextView"
android:text=
"TextView"
android:textSize=
"24sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.
799
"
app:layout_constraintHorizontal_bias=
"0.
134
"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.257"
/>
app:layout_constraintVertical_bias=
"0.651"
tools:ignore=
"DuplicateIds"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.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