Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
Simmitive_Chris_Crook
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
chris.crook
Simmitive_Chris_Crook
Commits
4c62cf61
Commit
4c62cf61
authored
Apr 08, 2021
by
chris.crook
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
> login button pretty much done
parent
a6e15b2a
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
1 deletion
+60
-1
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+3
-1
AdminMenu.java
...ain/java/com/example/summative_chris_crook/AdminMenu.java
+14
-0
MainActivity.java
.../java/com/example/summative_chris_crook/MainActivity.java
+11
-0
UserMenu.java
...main/java/com/example/summative_chris_crook/UserMenu.java
+14
-0
activity_admin_menu.xml
app/src/main/res/layout/activity_admin_menu.xml
+9
-0
activity_user_menu.xml
app/src/main/res/layout/activity_user_menu.xml
+9
-0
No files found.
app/src/main/AndroidManifest.xml
View file @
4c62cf61
...
@@ -9,7 +9,9 @@
...
@@ -9,7 +9,9 @@
android:roundIcon=
"@mipmap/ic_launcher_round"
android:roundIcon=
"@mipmap/ic_launcher_round"
android:supportsRtl=
"true"
android:supportsRtl=
"true"
android:theme=
"@style/Theme.Summative_Chris_Crook"
>
android:theme=
"@style/Theme.Summative_Chris_Crook"
>
<activity
android:name=
".register_page"
></activity>
<activity
android:name=
".AdminMenu"
></activity>
<activity
android:name=
".UserMenu"
/>
<activity
android:name=
".register_page"
/>
<activity
android:name=
".MainActivity"
>
<activity
android:name=
".MainActivity"
>
<intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
app/src/main/java/com/example/summative_chris_crook/AdminMenu.java
0 → 100644
View file @
4c62cf61
package
com
.
example
.
summative_chris_crook
;
import
androidx.appcompat.app.AppCompatActivity
;
import
android.os.Bundle
;
public
class
AdminMenu
extends
AppCompatActivity
{
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_admin_menu
);
}
}
\ No newline at end of file
app/src/main/java/com/example/summative_chris_crook/MainActivity.java
View file @
4c62cf61
...
@@ -2,6 +2,7 @@ package com.example.summative_chris_crook;
...
@@ -2,6 +2,7 @@ package com.example.summative_chris_crook;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.appcompat.app.AppCompatActivity
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.view.View
;
import
android.view.View
;
import
android.widget.EditText
;
import
android.widget.EditText
;
...
@@ -121,6 +122,12 @@ public class MainActivity extends AppCompatActivity {
...
@@ -121,6 +122,12 @@ public class MainActivity extends AppCompatActivity {
}
}
}
}
/*public void openpage(View view,String destination){
destination += ".class";
Intent intent = new Intent(this,destination);
startActivity(intent);
}*/
public
void
testlogin
(
View
view
){
public
void
testlogin
(
View
view
){
file1
=
new
File
(
getApplicationContext
().
getFilesDir
(),
filename1
+
".txt"
);
file1
=
new
File
(
getApplicationContext
().
getFilesDir
(),
filename1
+
".txt"
);
file2
=
new
File
(
getApplicationContext
().
getFilesDir
(),
filename2
+
".txt"
);
file2
=
new
File
(
getApplicationContext
().
getFilesDir
(),
filename2
+
".txt"
);
...
@@ -208,10 +215,14 @@ public class MainActivity extends AppCompatActivity {
...
@@ -208,10 +215,14 @@ public class MainActivity extends AppCompatActivity {
if
(
magicwords
[
i
]
[
4
].
equals
(
"ADMIN"
)){
if
(
magicwords
[
i
]
[
4
].
equals
(
"ADMIN"
)){
// user is an admin
// user is an admin
Toast
.
makeText
(
getApplicationContext
(),
"Signed in as admin"
,
Toast
.
LENGTH_SHORT
).
show
();
Toast
.
makeText
(
getApplicationContext
(),
"Signed in as admin"
,
Toast
.
LENGTH_SHORT
).
show
();
Intent
intent
=
new
Intent
(
this
,
AdminMenu
.
class
);
startActivity
(
intent
);
return
;
return
;
}
}
else
{
else
{
Toast
.
makeText
(
getApplicationContext
(),
"Signed in as user"
,
Toast
.
LENGTH_SHORT
).
show
();
Toast
.
makeText
(
getApplicationContext
(),
"Signed in as user"
,
Toast
.
LENGTH_SHORT
).
show
();
Intent
intent
=
new
Intent
(
this
,
UserMenu
.
class
);
startActivity
(
intent
);
return
;
return
;
}
}
}
}
...
...
app/src/main/java/com/example/summative_chris_crook/UserMenu.java
0 → 100644
View file @
4c62cf61
package
com
.
example
.
summative_chris_crook
;
import
androidx.appcompat.app.AppCompatActivity
;
import
android.os.Bundle
;
public
class
UserMenu
extends
AppCompatActivity
{
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_user_menu
);
}
}
\ No newline at end of file
app/src/main/res/layout/activity_admin_menu.xml
0 → 100644
View file @
4c62cf61
<?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"
tools:context=
".AdminMenu"
>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/activity_user_menu.xml
0 → 100644
View file @
4c62cf61
<?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"
tools:context=
".UserMenu"
>
</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