Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Theatre Booking App
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
a-j.towse
Theatre Booking App
Commits
87ff3eb7
Commit
87ff3eb7
authored
May 29, 2023
by
a-j.towse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working filter
working more info page, just add more play info
parent
f2850306
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
134 additions
and
14 deletions
+134
-14
build.gradle
app/build.gradle
+1
-1
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+8
-0
DBConnector.java
.../main/java/com/example/no1theatrecompany/DBConnector.java
+1
-2
MainActivity.java
...main/java/com/example/no1theatrecompany/MainActivity.java
+18
-11
performanceInfoPage.java
...va/com/example/no1theatrecompany/performanceInfoPage.java
+47
-0
performanceRecAdapter.java
.../com/example/no1theatrecompany/performanceRecAdapter.java
+13
-0
performance_infopage.xml
app/src/main/res/layout/performance_infopage.xml
+46
-0
No files found.
app/build.gradle
View file @
87ff3eb7
...
@@ -8,7 +8,7 @@ android {
...
@@ -8,7 +8,7 @@ android {
defaultConfig
{
defaultConfig
{
applicationId
"com.example.no1theatrecompany"
applicationId
"com.example.no1theatrecompany"
minSdk
19
minSdk
25
targetSdk
33
targetSdk
33
versionCode
1
versionCode
1
versionName
"1.0"
versionName
"1.0"
...
...
app/src/main/AndroidManifest.xml
View file @
87ff3eb7
...
@@ -32,6 +32,14 @@
...
@@ -32,6 +32,14 @@
android:name=
".MainActivity"
android:name=
".MainActivity"
android:exported=
"false"
>
android:exported=
"false"
>
<meta-data
android:name=
"android.app.lib_name"
android:value=
""
/>
</activity>
<activity
android:name=
".performanceInfoPage"
android:exported=
"false"
>
<meta-data
<meta-data
android:name=
"android.app.lib_name"
android:name=
"android.app.lib_name"
android:value=
""
/>
android:value=
""
/>
...
...
app/src/main/java/com/example/no1theatrecompany/DBConnector.java
View file @
87ff3eb7
...
@@ -107,8 +107,8 @@ public class DBConnector extends SQLiteOpenHelper {
...
@@ -107,8 +107,8 @@ public class DBConnector extends SQLiteOpenHelper {
play3
.
put
(
COLUMN_DATE
,
"Saturday 3 June 2023"
);
play3
.
put
(
COLUMN_DATE
,
"Saturday 3 June 2023"
);
play3
.
put
(
COLUMN_TIME
,
"19:00"
);
play3
.
put
(
COLUMN_TIME
,
"19:00"
);
play3
.
put
(
COLUMN_VENUE
,
"Dean's Park, York"
);
play3
.
put
(
COLUMN_VENUE
,
"Dean's Park, York"
);
play3
.
put
(
COLUMN_WHEELACCESS
,
"true"
);
play3
.
put
(
COLUMN_FLASH
,
"true"
);
play3
.
put
(
COLUMN_FLASH
,
"true"
);
play3
.
put
(
COLUMN_WHEELACCESS
,
"true"
);
play3
.
put
(
COLUMN_TIXSTAGE
,
"11,4"
);
play3
.
put
(
COLUMN_TIXSTAGE
,
"11,4"
);
play3
.
put
(
COLUMN_TIXGRASS
,
"29,4"
);
play3
.
put
(
COLUMN_TIXGRASS
,
"29,4"
);
...
@@ -147,7 +147,6 @@ public class DBConnector extends SQLiteOpenHelper {
...
@@ -147,7 +147,6 @@ public class DBConnector extends SQLiteOpenHelper {
db
.
insert
(
TABLE_PERFORMANCES
,
null
,
play5
);
//Store play details
db
.
insert
(
TABLE_PERFORMANCES
,
null
,
play5
);
//Store play details
db
.
insert
(
TABLE_PERFORMANCES
,
null
,
play6
);
//Store play details
db
.
insert
(
TABLE_PERFORMANCES
,
null
,
play6
);
//Store play details
}
}
//Method to add new user into table
//Method to add new user into table
...
...
app/src/main/java/com/example/no1theatrecompany/MainActivity.java
View file @
87ff3eb7
...
@@ -82,28 +82,35 @@ public class MainActivity extends AppCompatActivity {
...
@@ -82,28 +82,35 @@ public class MainActivity extends AppCompatActivity {
//connect to DBConnector
//connect to DBConnector
DBConnector
connector
=
new
DBConnector
(
this
,
null
);
DBConnector
connector
=
new
DBConnector
(
this
,
null
);
ArrayList
performanceInfoList
=
connector
.
getPerformanceInfo
();
ArrayList
performanceInfoList
=
connector
.
getPerformanceInfo
();
ArrayList
<
ArrayList
>
filtIndexList
=
new
ArrayList
<>();
int
performanceNum
=
performanceInfoList
.
size
();
for
(
int
i
=
0
;
i
<
performance
InfoList
.
size
()
;
i
++)
{
for
(
int
i
=
0
;
i
<
performance
Num
;
i
++)
{
ArrayList
tempList
=
(
ArrayList
)
performanceInfoList
.
get
(
i
);
ArrayList
temp
Filter
List
=
(
ArrayList
)
performanceInfoList
.
get
(
i
);
if
(
flashIsChecked
==
true
)
{
if
(
flashIsChecked
==
true
)
{
if
(
temp
List
.
get
(
5
)
==
null
)
{
if
(
temp
FilterList
.
get
(
4
)
==
null
)
{
performanceInfoList
.
remove
(
i
);
filtIndexList
.
add
(
tempFilterList
);
}
}
}
}
else
if
(
steps
IsChecked
==
true
)
{
if
(
wheel
IsChecked
==
true
)
{
if
(
temp
List
.
get
(
6
)
==
null
)
{
if
(
temp
FilterList
.
get
(
5
)
==
null
)
{
performanceInfoList
.
remove
(
i
);
filtIndexList
.
add
(
tempFilterList
);
}
}
}
}
else
if
(
wheel
IsChecked
==
true
)
{
if
(
steps
IsChecked
==
true
)
{
if
(
temp
List
.
get
(
7
)
==
null
)
{
if
(
temp
FilterList
.
get
(
6
)
==
null
)
{
performanceInfoList
.
remove
(
i
);
filtIndexList
.
add
(
tempFilterList
);
}
}
}
}
}
}
System
.
out
.
println
(
filtIndexList
);
for
(
int
x
=
0
;
x
<
filtIndexList
.
size
();
x
++)
{
performanceInfoList
.
remove
(
filtIndexList
.
get
(
x
));
}
System
.
out
.
println
(
performanceInfoList
);
performanceList
=
new
ArrayList
<>();
performanceList
=
new
ArrayList
<>();
RecyclerView
recyclerObj
=
findViewById
(
R
.
id
.
performanceRecycler
);
RecyclerView
recyclerObj
=
findViewById
(
R
.
id
.
performanceRecycler
);
...
...
app/src/main/java/com/example/no1theatrecompany/performanceInfoPage.java
0 → 100644
View file @
87ff3eb7
package
com
.
example
.
no1theatrecompany
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.widget.TextView
;
import
androidx.appcompat.app.AppCompatActivity
;
import
java.util.List
;
public
class
performanceInfoPage
extends
AppCompatActivity
{
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
performance_infopage
);
Intent
intent
=
getIntent
();
String
selectedPerformance
=
intent
.
getStringExtra
(
"selectedPlay"
);
setInfo
(
selectedPerformance
);
}
public
void
backBtn
(
View
view
)
{
onBackPressed
();
}
void
setInfo
(
String
performance
)
{
System
.
out
.
println
(
performance
);
TextView
nameTextView
=
(
TextView
)
findViewById
(
R
.
id
.
performanceTitle
);
TextView
dateTimeTextView
=
(
TextView
)
findViewById
(
R
.
id
.
dateTimetextView
);
switch
(
performance
)
{
case
"The Tempest"
:
nameTextView
.
setText
(
"The Tempest"
);
case
"A Midsummer Night's Dream by William Shakespeare"
:
nameTextView
.
setText
(
"A Midsummer Night's Dream by William Shakespeare"
);
dateTimeTextView
.
setText
(
"Saturday 3 June 2023, 19:00"
);
}
}
}
app/src/main/java/com/example/no1theatrecompany/performanceRecAdapter.java
View file @
87ff3eb7
package
com
.
example
.
no1theatrecompany
;
package
com
.
example
.
no1theatrecompany
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.telecom.Call
;
import
android.view.LayoutInflater
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
...
@@ -28,10 +30,21 @@ public class performanceRecAdapter extends RecyclerView.Adapter<IdleViewHolder>
...
@@ -28,10 +30,21 @@ public class performanceRecAdapter extends RecyclerView.Adapter<IdleViewHolder>
return
new
IdleViewHolder
(
view
);
return
new
IdleViewHolder
(
view
);
}
}
@Override
@Override
public
void
onBindViewHolder
(
@NonNull
IdleViewHolder
holder
,
int
position
)
{
public
void
onBindViewHolder
(
@NonNull
IdleViewHolder
holder
,
int
position
)
{
IdleData
data
=
mData
.
get
(
position
);
IdleData
data
=
mData
.
get
(
position
);
holder
.
setData
(
data
);
holder
.
setData
(
data
);
holder
.
nameText
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
Intent
intent
=
new
Intent
(
view
.
getContext
(),
performanceInfoPage
.
class
);
intent
.
putExtra
(
"selectedPlay"
,
mData
.
get
(
position
).
name
);
view
.
getContext
().
startActivity
(
intent
);
}
});
}
}
@Override
@Override
...
...
app/src/main/res/layout/performance_infopage.xml
0 → 100644
View file @
87ff3eb7
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
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:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<Button
android:id=
"@+id/backBtn"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginTop=
"16dp"
android:text=
"Back"
android:onClick=
"backBtn"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginTop=
"16dp"
android:layout_marginEnd=
"16dp"
android:orientation=
"vertical"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/backBtn"
>
<TextView
android:id=
"@+id/performanceTitle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:fontFamily=
"sans-serif"
android:text=
"TextView"
android:textAlignment=
"center"
android:textSize=
"20sp"
/>
<TextView
android:id=
"@+id/dateTimetextView"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"TextView"
/>
</LinearLayout>
</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