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
bac7ba9a
Commit
bac7ba9a
authored
May 18, 2023
by
a-j.towse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working performance name display
parent
b477125d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
DBConnector.java
.../main/java/com/example/no1theatrecompany/DBConnector.java
+11
-7
IdleData.java
...src/main/java/com/example/no1theatrecompany/IdleData.java
+1
-0
MainActivity.java
...main/java/com/example/no1theatrecompany/MainActivity.java
+2
-1
No files found.
app/src/main/java/com/example/no1theatrecompany/DBConnector.java
View file @
bac7ba9a
...
...
@@ -236,16 +236,20 @@ public class DBConnector extends SQLiteOpenHelper {
Cursor
cursor
=
db
.
rawQuery
(
query
,
null
);
String
info
;
ArrayList
<
String
>
tempList
=
new
ArrayList
<>();
cursor
.
moveToFirst
();
for
(
int
i
=
0
;
i
<
cursor
.
getCount
();
i
++)
{
for
(
int
x
=
1
;
x
<
cursor
.
getColumnCount
();
x
++)
{
info
=
cursor
.
getString
(
x
);
for
(
int
i
=
0
;
i
<
cursor
.
getCount
();
i
++){
ArrayList
<
String
>
tempList
=
new
ArrayList
<>();
for
(
int
column
=
1
;
column
<
cursor
.
getColumnCount
();
column
++)
{
info
=
cursor
.
getString
(
column
);
tempList
.
add
(
info
);
}
performanceInfoList
.
add
(
tempList
);
cursor
.
moveToNext
();
}
performanceInfoList
.
add
(
tempList
);
cursor
.
moveToNext
();
}
//Close DB
...
...
app/src/main/java/com/example/no1theatrecompany/IdleData.java
View file @
bac7ba9a
...
...
@@ -6,6 +6,7 @@ public class IdleData {
IdleData
(
String
name
)
{
this
.
name
=
name
;
}
...
...
app/src/main/java/com/example/no1theatrecompany/MainActivity.java
View file @
bac7ba9a
...
...
@@ -41,7 +41,8 @@ public class MainActivity extends AppCompatActivity {
ArrayList
performanceInfoList
=
connector
.
getPerformanceInfo
();
for
(
int
i
=
0
;
i
<
performanceInfoList
.
size
();
i
++)
{
performanceList
.
add
(
i
,
new
IdleData
(
performanceInfoList
.
get
(
i
).
toString
()));
ArrayList
tempList
=
(
ArrayList
)
performanceInfoList
.
get
(
i
);
performanceList
.
add
(
performanceList
.
size
(),
new
IdleData
(
tempList
.
get
(
0
).
toString
()));
this
.
adapter
.
notifyItemInserted
(
this
.
adapter
.
getItemCount
());
}
...
...
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