Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OD-System
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Prashanth Sadasivan
OD-System
Commits
f9805b30
Commit
f9805b30
authored
8 years ago
by
darshanxyz
Browse files
Options
Downloads
Patches
Plain Diff
Email Broadcast
parent
a6f2862b
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/src/main/java/com/darshanbshah/odsystem/RollNumber.java
+1
-13
1 addition, 13 deletions
app/src/main/java/com/darshanbshah/odsystem/RollNumber.java
app/src/main/java/com/darshanbshah/odsystem/TeacherActivity.java
+14
-1
14 additions, 1 deletion
.../main/java/com/darshanbshah/odsystem/TeacherActivity.java
with
15 additions
and
14 deletions
app/src/main/java/com/darshanbshah/odsystem/RollNumber.java
+
1
−
13
View file @
f9805b30
...
...
@@ -111,21 +111,9 @@ public class RollNumber extends AppCompatActivity implements AdapterView.OnItemS
}
if
(
lst
.
contains
(
mAuth
.
getCurrentUser
().
getEmail
()))
{
startActivity
(
new
Intent
(
getApplicationContext
(),
TeacherActivity
.
class
));
finish
();
}
else
{
// SharedPreferences preferences = getSharedPreferences("ActivityPREF", Context.MODE_PRIVATE);
//
// if(preferences.getBoolean("activity_executed", false)){
// Intent intent = new Intent(RollNumber.this, MainActivity.class);
// startActivity(intent);
// finish();
// dialog.hide();
// }
// else {
// SharedPreferences.Editor edit = preferences.edit();
// edit.putBoolean("activity_executed", true);
// edit.commit();
// }
dialog
.
hide
();
}
}
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/com/darshanbshah/odsystem/TeacherActivity.java
+
14
−
1
View file @
f9805b30
...
...
@@ -63,7 +63,8 @@ public class TeacherActivity extends AppCompatActivity {
String
adv_name
,
key
,
value
,
uid
=
""
;
List
<
String
>
roll
=
new
ArrayList
<
String
>();
List
<
String
>
random
=
new
ArrayList
<
String
>();
List
<
DatabaseReference
>
od_student_list
=
new
ArrayList
<
DatabaseReference
>();
List
<
String
>
adv_list
=
new
ArrayList
<
String
>();
// List<DatabaseReference> od_student_list = new ArrayList<DatabaseReference>();
String
flag
=
""
,
reason
=
""
,
from
=
""
,
to
=
""
,
fullday
=
""
;
...
...
@@ -122,6 +123,10 @@ public class TeacherActivity extends AppCompatActivity {
adv_name
=
dataSnapshot
.
getKey
();
}
}
for
(
DataSnapshot
dsp
:
dataSnapshot
.
getChildren
()){
adv_list
.
add
(
String
.
valueOf
(
dsp
.
getValue
()));
Log
.
e
(
"EMAILS: "
,
String
.
valueOf
(
dsp
.
getValue
()));
}
}
@Override
...
...
@@ -235,6 +240,7 @@ public class TeacherActivity extends AppCompatActivity {
@Override
public
void
onItemClick
(
AdapterView
<?>
parent
,
View
view
,
final
int
position
,
long
id
)
{
// Toast.makeText(getApplicationContext(), String.valueOf(position), Toast.LENGTH_SHORT).show();
Log
.
e
(
"RCPT"
,
String
.
valueOf
(
adv_list
.
size
()));
builder
=
new
AlertDialog
.
Builder
(
TeacherActivity
.
this
);
builder
.
setPositiveButton
(
"Approve"
,
new
DialogInterface
.
OnClickListener
()
{
@Override
...
...
@@ -277,6 +283,13 @@ public class TeacherActivity extends AppCompatActivity {
}
});
recepients
=
adv_list
.
toArray
(
new
String
[
0
]);
Log
.
e
(
"RCPTSIZE"
,
String
.
valueOf
(
recepients
.
length
));
for
(
int
i
=
0
;
i
<
recepients
.
length
;
i
++)
{
Log
.
e
(
"RECPT"
,
recepients
[
i
]);
}
TextView
textView
=
(
TextView
)
findViewById
(
R
.
id
.
listText
);
textView
.
setTextColor
(
Color
.
parseColor
(
"#12bfac"
));
Intent
intent
=
new
Intent
(
Intent
.
ACTION_SEND
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment