Skip to content
Snippets Groups Projects
Select Git revision
  • c291a9be3673c5c6058d8af333d777955e4fa13b
  • master default
  • patch-1
3 results

TeacherActivity.java

Blame
  • Forked from Android 2017 / OD-System
    Source project has a limited visibility.
    TeacherActivity.java 10.41 KiB
    package com.darshanbshah.odsystem;
    
    import android.app.AlertDialog;
    import android.content.DialogInterface;
    import android.content.Intent;
    import android.support.v7.app.AppCompatActivity;
    import android.os.Bundle;
    import android.util.Log;
    import android.view.View;
    import android.widget.AdapterView;
    import android.widget.ListView;
    import android.widget.Toast;
    
    import com.google.firebase.auth.FirebaseAuth;
    import com.google.firebase.database.ChildEventListener;
    import com.google.firebase.database.DataSnapshot;
    import com.google.firebase.database.DatabaseError;
    import com.google.firebase.database.DatabaseReference;
    import com.google.firebase.database.FirebaseDatabase;
    
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.Hashtable;
    import java.util.List;
    
    
    public class TeacherActivity extends AppCompatActivity {
    
        class ODTable {
            String flag, reason, from, to, fullday;
    
            public ODTable(String flag, String reason, String from, String to, String fullday) {
                this.flag = flag;
                this.reason = reason;
                this.from = from;
                this.to = to;
                this.fullday = fullday;
            }
    
        }
        ODTable table;
        int i = 0;
        AlertDialog.Builder builder;
        DataProvider itemValue;
        FirebaseAuth mAuth;
        FirebaseDatabase database = FirebaseDatabase.getInstance();
    
        DatabaseReference root;
        DatabaseReference adv;
        DatabaseReference student;
        DatabaseReference od, od_flag, od_student;
        String message = "";
        List<String> uid_list = new ArrayList<String>();
        HashMap<String, String> uid_map = new HashMap<String, String>();
        HashMap<String, String> student_map = new HashMap<String, String>();
        Hashtable<String, ODTable> odtable = new Hashtable<String, ODTable>();
        ListView listView;
        CustomListAdapter adapter;
        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>();
    
        String flag = "", reason = "", from = "", to = "", fullday = "";
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_teacher);
            mAuth = FirebaseAuth.getInstance();