あとでろるばすりゅ

This commit is contained in:
nemukemo 2024-07-09 19:49:58 +09:00
parent 823fa8a2c4
commit 634547622a
2 changed files with 26 additions and 34 deletions

View File

@ -16,19 +16,18 @@ import java.util.Map;
public class FirestoreReception { public class FirestoreReception {
//firestoreから受け取ったデータを束ねるためのマップ
public List<MyDataClass> myDataList = new ArrayList<>();
private FirebaseFirestore db; private FirebaseFirestore db;
public FirestoreReception() { public FirestoreReception() {
db = FirebaseFirestore.getInstance(); db = FirebaseFirestore.getInstance();
} }
//firestoreから受け取ったデータを束ねるためのマップ
public List<MyDataClass> myDataList = new ArrayList<>();
//ClassIdを引数にデータの作成を行う //ClassIdを引数にデータの作成を行う
public void getDocumentsByClassId(int classId) { public void getDocumentsByClassId(int classId) {
myDataList.clear(); myDataList.clear();
CollectionReference collectionRef = db.collection("QuestionnaireForms"); CollectionReference collectionRef = db.collection("testTimeStamp");
// classIdが引数のものを取得する // classIdが引数のものを取得する
collectionRef.whereEqualTo("classId", classId).get() collectionRef.whereEqualTo("classId", classId).get()

View File

@ -2,7 +2,6 @@ package com.example.oplogy;
import static android.content.ContentValues.TAG; import static android.content.ContentValues.TAG;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.app.DatePickerDialog; import android.app.DatePickerDialog;
import android.app.TimePickerDialog; import android.app.TimePickerDialog;
@ -42,6 +41,16 @@ public class SetUpActivity extends FragmentActivity
String startBreakTimeString; String startBreakTimeString;
String endBreakTimeString; String endBreakTimeString;
int totalStudentString; int totalStudentString;
String stringYearString;
String stringMonthString;
String stringDayOfMonthString;
String stringHourOfDayString;
String stringMinuteString;
Button setFirstDay;
Button setSecondDay;
Button setThirdDay;
Button setStartTimeButton;
Button setEndTimeButton;
private TextView setTeacherName; private TextView setTeacherName;
private TextView setStartPoint; private TextView setStartPoint;
private TextView setStartTime; private TextView setStartTime;
@ -52,22 +61,6 @@ public class SetUpActivity extends FragmentActivity
private int isDateSelectedInt; private int isDateSelectedInt;
private int isStartTimeSelectedInt; private int isStartTimeSelectedInt;
String stringYearString;
String stringMonthString;
String stringDayOfMonthString;
String stringHourOfDayString;
String stringMinuteString;
Button setFirstDay;
Button setSecondDay;
Button setThirdDay;
Button setStartTimeButton;
Button setEndTimeButton;
@SuppressLint("MissingInflatedId") @SuppressLint("MissingInflatedId")
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {