Compare commits
11 Commits
90c6f055dd
...
82d4195dd2
| Author | SHA1 | Date |
|---|---|---|
|
|
82d4195dd2 | |
|
|
42a19f092d | |
|
|
003ecf879e | |
|
|
f8a5b6f871 | |
|
|
c1817fc1ce | |
|
|
6f32f1e570 | |
|
|
9943ea0790 | |
|
|
d9f2f7c550 | |
|
|
729293cb80 | |
|
|
708c485cd0 | |
|
|
ad0f60b8a6 |
|
|
@ -10,7 +10,7 @@
|
||||||
<component name="VisualizationToolProject">
|
<component name="VisualizationToolProject">
|
||||||
<option name="state">
|
<option name="state">
|
||||||
<ProjectState>
|
<ProjectState>
|
||||||
<option name="scale" value="0.22" />
|
<option name="scale" value="0.045764362220058426" />
|
||||||
</ProjectState>
|
</ProjectState>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,9 @@
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:label="@string/title_activity_notes"/>
|
android:label="@string/title_activity_notes"/>
|
||||||
<activity android:name=".main.MainActivity"/>
|
<activity android:name=".main.MainActivity"/>
|
||||||
|
|
||||||
|
<activity android:name=".quiz.QuizActivity"/>
|
||||||
|
<activity android:name=".dice.DiceActivity"/>
|
||||||
<activity
|
<activity
|
||||||
android:name=".login.LoginActivity"
|
android:name=".login.LoginActivity"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
|
|
|
||||||
|
|
@ -5,5 +5,8 @@ public enum BtnID {
|
||||||
EDIT_BUTTON,
|
EDIT_BUTTON,
|
||||||
DELETE_BUTTON,
|
DELETE_BUTTON,
|
||||||
NOTES_BUTTON,
|
NOTES_BUTTON,
|
||||||
QUIZ_BUTTON
|
QUIZ_BUTTON,
|
||||||
|
DICE_BUTTON,
|
||||||
|
BACKGROUND_BUTTON
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
package xyz.r0r5chach.cpsAssist.dice;
|
||||||
|
|
||||||
|
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import xyz.r0r5chach.cpsAssist.R;
|
||||||
|
|
||||||
|
public class BtnOnClickListener implements View.OnClickListener{
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
LinearLayout l = (LinearLayout) v.getParent();
|
||||||
|
Random rand = new Random();
|
||||||
|
TextView output = l.findViewById(R.id.dice_output);
|
||||||
|
EditText input = l.findViewById(R.id.dice_input);
|
||||||
|
output.setText(String.valueOf(rand.nextInt(Integer.parseInt(input.getText().toString()))));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
package xyz.r0r5chach.cpsAssist.dice;
|
||||||
|
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import xyz.r0r5chach.cpsAssist.R;
|
||||||
|
|
||||||
|
public class DiceActivity extends AppCompatActivity {
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_dice);
|
||||||
|
setTitle("Dice Roller- " + getIntent().getStringExtra("username"));
|
||||||
|
if (getIntent().hasExtra("background")) {
|
||||||
|
findViewById(R.id.dice_layout).setBackgroundColor(Color.parseColor(getIntent().getStringExtra("background")));
|
||||||
|
}
|
||||||
|
findViewById(R.id.dice_roll_button).setOnClickListener(new BtnOnClickListener());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -2,17 +2,29 @@ package xyz.r0r5chach.cpsAssist.main;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.graphics.Color;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
import xyz.r0r5chach.cpsAssist.BtnID;
|
import xyz.r0r5chach.cpsAssist.BtnID;
|
||||||
|
import xyz.r0r5chach.cpsAssist.dice.DiceActivity;
|
||||||
|
import xyz.r0r5chach.cpsAssist.R;
|
||||||
import xyz.r0r5chach.cpsAssist.quiz.QuizActivity;
|
import xyz.r0r5chach.cpsAssist.quiz.QuizActivity;
|
||||||
import xyz.r0r5chach.cpsAssist.notes.NotesActivity;
|
import xyz.r0r5chach.cpsAssist.notes.NotesActivity;
|
||||||
|
|
||||||
public class BtnOnClickListener implements View.OnClickListener{
|
public class BtnOnClickListener implements View.OnClickListener{
|
||||||
|
private String backgroundColor;
|
||||||
|
|
||||||
|
public BtnOnClickListener() {
|
||||||
|
backgroundColor = null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
LinearLayout l = (LinearLayout) v.getParent();
|
||||||
String id = v.getResources().getResourceName(v.getId()).split("/")[1];
|
String id = v.getResources().getResourceName(v.getId()).split("/")[1];
|
||||||
Intent intent = null;
|
Intent intent = null;
|
||||||
switch(BtnID.valueOf(id.toUpperCase(Locale.ROOT))) {
|
switch(BtnID.valueOf(id.toUpperCase(Locale.ROOT))) {
|
||||||
|
|
@ -22,10 +34,21 @@ public class BtnOnClickListener implements View.OnClickListener{
|
||||||
case QUIZ_BUTTON:
|
case QUIZ_BUTTON:
|
||||||
intent = new Intent(v.getContext(), QuizActivity.class);
|
intent = new Intent(v.getContext(), QuizActivity.class);
|
||||||
break;
|
break;
|
||||||
|
case DICE_BUTTON:
|
||||||
|
intent = new Intent(v.getContext(), DiceActivity.class);
|
||||||
|
break;
|
||||||
|
case BACKGROUND_BUTTON:
|
||||||
|
Random rand = new Random();
|
||||||
|
backgroundColor = String.format("#%06x", rand.nextInt(0xffffff + 1));
|
||||||
|
l.setBackgroundColor(Color.parseColor(backgroundColor));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
Activity main = (Activity) v.getContext();
|
Activity main = (Activity) v.getContext();
|
||||||
if (intent != null) {
|
if (intent != null) {
|
||||||
intent.putExtra("username", main.getIntent().getStringExtra("username"));
|
intent.putExtra("username", main.getIntent().getStringExtra("username"));
|
||||||
|
if (backgroundColor != null) {
|
||||||
|
intent.putExtra("background", backgroundColor);
|
||||||
|
}
|
||||||
main.startActivity(intent);
|
main.startActivity(intent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package xyz.r0r5chach.cpsAssist.main;
|
package xyz.r0r5chach.cpsAssist.main;
|
||||||
|
|
||||||
|
import android.media.MediaDrm;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
@ -13,11 +14,19 @@ public class MainActivity extends AppCompatActivity {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
setTitle("Home- " + getIntent().getStringExtra("username"));
|
setTitle("Home- " + getIntent().getStringExtra("username"));
|
||||||
findViewById(R.id.notes_button).setOnClickListener(new BtnOnClickListener());
|
initButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
finish();
|
finish();
|
||||||
|
} //TODO: Add change background button to layout and add logic to listner
|
||||||
|
|
||||||
|
private void initButtons() {
|
||||||
|
BtnOnClickListener lstn = new BtnOnClickListener();
|
||||||
|
findViewById(R.id.notes_button).setOnClickListener(lstn);
|
||||||
|
findViewById(R.id.quiz_button).setOnClickListener(lstn);
|
||||||
|
findViewById(R.id.background_button).setOnClickListener(lstn);
|
||||||
|
findViewById(R.id.dice_button).setOnClickListener(lstn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import android.graphics.Color;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
|
@ -18,6 +19,9 @@ public class NotesActivity extends AppCompatActivity {
|
||||||
setContentView(R.layout.activity_notes);
|
setContentView(R.layout.activity_notes);
|
||||||
initRecycler();
|
initRecycler();
|
||||||
setTitle("Notes- " + getIntent().getStringExtra("username"));
|
setTitle("Notes- " + getIntent().getStringExtra("username"));
|
||||||
|
if (getIntent().hasExtra("background")) {
|
||||||
|
findViewById(R.id.notes_layout).setBackgroundColor(Color.parseColor(getIntent().getStringExtra("background")));
|
||||||
|
}
|
||||||
findViewById(R.id.add_Button).setOnClickListener(new BtnOnClickListener(adapter));
|
findViewById(R.id.add_Button).setOnClickListener(new BtnOnClickListener(adapter));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
package xyz.r0r5chach.cpsAssist.quiz;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.RadioButton;
|
||||||
|
import android.widget.RadioGroup;
|
||||||
|
|
||||||
|
|
||||||
|
import xyz.r0r5chach.cpsAssist.R;
|
||||||
|
|
||||||
|
public class BtnOnClickListener implements View.OnClickListener{
|
||||||
|
private final String[] correctAnswers;
|
||||||
|
|
||||||
|
|
||||||
|
public BtnOnClickListener(String[] correctAnswers) {
|
||||||
|
this.correctAnswers = correctAnswers;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
LinearLayout l = (LinearLayout) v.getParent();
|
||||||
|
RadioGroup[] questions = new RadioGroup[]{l.findViewById(R.id.question1), l.findViewById(R.id.question2), l.findViewById(R.id.question3), l.findViewById(R.id.question4), l.findViewById(R.id.question5)};
|
||||||
|
int score = 0;
|
||||||
|
for (int i = 0; i < questions.length; i++) {
|
||||||
|
if (questions[i].getCheckedRadioButtonId() == -1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
RadioButton answer = questions[i].findViewById(questions[i].getCheckedRadioButtonId());
|
||||||
|
if (answer.getText().toString().equals(correctAnswers[i])) {
|
||||||
|
score++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder(v.getContext());
|
||||||
|
builder.setTitle("Results");
|
||||||
|
builder.setMessage(score + "/5");
|
||||||
|
builder.setPositiveButton("Save", new DialogOnClickListener(((Activity)v.getContext()).getIntent().getStringExtra("username"), score));
|
||||||
|
builder.setNeutralButton("Ok", new DialogOnClickListener());
|
||||||
|
builder.create().show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
package xyz.r0r5chach.cpsAssist.quiz;
|
||||||
|
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
import xyz.r0r5chach.cpsAssist.notes.Notes;
|
||||||
|
|
||||||
|
public class DialogOnClickListener implements DialogInterface.OnClickListener {
|
||||||
|
private String username;
|
||||||
|
private int score;
|
||||||
|
|
||||||
|
|
||||||
|
public DialogOnClickListener() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogOnClickListener(String username, int score) {
|
||||||
|
this.score = score;
|
||||||
|
this.username = username;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
AlertDialog d = (AlertDialog) dialog;
|
||||||
|
if (which == DialogInterface.BUTTON_POSITIVE) {
|
||||||
|
Notes notes = new Notes(d.getContext().getExternalFilesDir(null), username);
|
||||||
|
notes.createNote();
|
||||||
|
File note = notes.getNote(notes.getAmount()-1);
|
||||||
|
notes.updateNote(note, "Quiz Results: " + score + "/5");
|
||||||
|
}
|
||||||
|
d.dismiss();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
package xyz.r0r5chach.cpsAssist.quiz;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class Quiz {
|
||||||
|
private final String[] questions;
|
||||||
|
|
||||||
|
private String[] correctAnswers;
|
||||||
|
|
||||||
|
private final List<List<String>> answers;
|
||||||
|
|
||||||
|
private final String storedCorrectAnswers;
|
||||||
|
private final String storedIncorrectAnswers;
|
||||||
|
|
||||||
|
public Quiz(String storedQuestions, String storedCorrectAnswers, String storedIncorrectAnswers) {
|
||||||
|
questions = parseList(storedQuestions);
|
||||||
|
answers = new ArrayList<>();
|
||||||
|
this.storedCorrectAnswers = storedCorrectAnswers;
|
||||||
|
this.storedIncorrectAnswers = storedIncorrectAnswers;
|
||||||
|
parseAnswers();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public String[] getCorrectAnswers() {
|
||||||
|
return correctAnswers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String[] getQuestions() {
|
||||||
|
return questions;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<List<String>> getAnswers() {
|
||||||
|
return answers;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void parseAnswers() {
|
||||||
|
correctAnswers = parseList(storedCorrectAnswers);
|
||||||
|
String[] incorrectAnswers = parseList(storedIncorrectAnswers);
|
||||||
|
for (int i = 0; i < incorrectAnswers.length; i++) {
|
||||||
|
List<String> answers = new ArrayList<>();
|
||||||
|
answers.add(correctAnswers[i]);
|
||||||
|
answers.addAll(Arrays.asList(incorrectAnswers[i].split("%")));
|
||||||
|
this.answers.add(answers);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private String[] parseList(String list) {
|
||||||
|
return list.split("#");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,82 @@
|
||||||
package xyz.r0r5chach.cpsAssist.quiz;
|
package xyz.r0r5chach.cpsAssist.quiz;
|
||||||
|
|
||||||
public class QuizActivity {
|
import android.graphics.Color;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.RadioButton;
|
||||||
|
import android.widget.RadioGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.stream.IntStream;
|
||||||
|
|
||||||
|
import xyz.r0r5chach.cpsAssist.R;
|
||||||
|
|
||||||
|
public class QuizActivity extends AppCompatActivity {
|
||||||
|
private Quiz quiz;
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_quiz);
|
||||||
|
setTitle("Quiz- " + getIntent().getStringExtra("username"));
|
||||||
|
if (getIntent().hasExtra("background")) {
|
||||||
|
findViewById(R.id.quiz_layout).setBackgroundColor(Color.parseColor(getIntent().getStringExtra("background")));
|
||||||
|
}
|
||||||
|
LinearLayout layout = findViewById(R.id.quiz_layout);
|
||||||
|
quiz = new Quiz(getString(R.string.questions), getString(R.string.correct_answers), getString(R.string.incorrect_answers));
|
||||||
|
initQuestions(layout);
|
||||||
|
initSubmit(layout);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initSubmit(LinearLayout l) {
|
||||||
|
Button button = new Button(this);
|
||||||
|
button.setText(R.string.submit_button_text);
|
||||||
|
button.setOnClickListener(new BtnOnClickListener(quiz.getCorrectAnswers()));
|
||||||
|
l.addView(button);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void initQuestions(LinearLayout l) {
|
||||||
|
IntStream.range(0, quiz.getQuestions().length).forEach(i -> {
|
||||||
|
RadioGroup questionGroup = new RadioGroup(this);
|
||||||
|
int id = getId(i);
|
||||||
|
questionGroup.setId(id);
|
||||||
|
TextView question = new TextView(this);
|
||||||
|
question.setText(quiz.getQuestions()[i]);
|
||||||
|
questionGroup.addView(question);
|
||||||
|
for (String answer : quiz.getAnswers().get(i)) {
|
||||||
|
RadioButton answerButton = new RadioButton(this);
|
||||||
|
answerButton.setText(answer);
|
||||||
|
questionGroup.addView(answerButton);
|
||||||
|
}
|
||||||
|
l.addView(questionGroup);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private int getId(int index) {
|
||||||
|
int id;
|
||||||
|
switch(index) {
|
||||||
|
case 0:
|
||||||
|
id = R.id.question1;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
id = R.id.question2;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
id = R.id.question3;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
id = R.id.question4;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
id = R.id.question5;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
id = 0;
|
||||||
|
}
|
||||||
|
return id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:id="@+id/dice_layout">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/dice_output"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/dice_input"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:autofillHints=""
|
||||||
|
android:ems="10"
|
||||||
|
android:hint="@string/dice_hint"
|
||||||
|
android:inputType="number"
|
||||||
|
android:minHeight="48dp" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/dice_roll_button"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/dice_button_text" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:id="@+id/main_layout"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -15,4 +16,15 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/quiz_button_text" />
|
android:text="@string/quiz_button_text" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/background_button"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/change_background_button_text" />
|
||||||
|
<Button
|
||||||
|
android:id="@+id/dice_button"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/dice_roller_button_text"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/notes_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/quiz_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/quiz_button_text" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources>
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="Theme.CpsAssist" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
<style name="Theme.CpsAssist" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||||
<!-- Primary brand color. -->
|
<!-- Primary brand color. -->
|
||||||
|
|
@ -13,8 +13,4 @@
|
||||||
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
|
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
</style>
|
</style>
|
||||||
<style name="edit_dialog">
|
|
||||||
<item name="android:background">@color/white</item>
|
|
||||||
<item name="android:textColor">@color/black</item>
|
|
||||||
</style>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<item name="question" type="id" />
|
||||||
|
<item name="question1" type="id" />
|
||||||
|
<item name="question2" type="id" />
|
||||||
|
<item name="question3" type="id" />
|
||||||
|
<item name="question4" type="id" />
|
||||||
|
<item name="question5" type="id"/>
|
||||||
|
</resources>
|
||||||
|
|
@ -5,12 +5,20 @@
|
||||||
<string name="passwordFieldHint">Password</string>
|
<string name="passwordFieldHint">Password</string>
|
||||||
<string name="loginButtonText">Login</string>
|
<string name="loginButtonText">Login</string>
|
||||||
<string name="users">josh#pass%kofi#pass%jaiwin#pass</string>
|
<string name="users">josh#pass%kofi#pass%jaiwin#pass</string>
|
||||||
|
<string name="questions">What is the capital of the UK?#What is the electron count of helium?#What does RAM stand for?#What is the boiling point of water?#When did WWII end?</string>
|
||||||
|
<string name="correct_answers">London#2#Random Access Memory#100 degrees celsius#1945</string>
|
||||||
|
<string name="incorrect_answers">New York City%Paris%Madrid#5%6%9%64#Read Admin Memory%Rapid Access Memory#0 degrees celsius%20 degrees celsius#2001%1666%1920</string>
|
||||||
<string name="title_activity_notes">NotesActivity</string>
|
<string name="title_activity_notes">NotesActivity</string>
|
||||||
<!-- Notes View -->
|
<!-- Notes View -->
|
||||||
<string name="addButtonText">Add</string>
|
<string name="addButtonText">Add</string>
|
||||||
<string name="editButtonText">Edit</string>
|
<string name="editButtonText">Edit</string>
|
||||||
<string name="deleteButtonText">Delete</string>
|
<string name="deleteButtonText">Delete</string>
|
||||||
<string name="note_edit_hint">Note</string>
|
<string name="note_edit_hint">Notes</string>
|
||||||
<string name="saveButtonText">Save</string>
|
<string name="saveButtonText">Save</string>
|
||||||
<string name="quiz_button_text">Quiz</string>
|
<string name="quiz_button_text">Quiz</string>
|
||||||
|
<string name="submit_button_text">Submit</string>
|
||||||
|
<string name="dice_hint">How many sides do you want the dice to have?</string>
|
||||||
|
<string name="dice_button_text">Roll</string>
|
||||||
|
<string name="dice_roller_button_text">Dice Roller</string>
|
||||||
|
<string name="change_background_button_text">Change Background</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -19,8 +19,4 @@
|
||||||
</style>
|
</style>
|
||||||
<style name="Theme.CpsAssist.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
<style name="Theme.CpsAssist.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||||
<style name="Theme.CpsAssist.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
<style name="Theme.CpsAssist.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||||
<style name="edit_dialog">
|
|
||||||
<item name="android:background">@color/black</item>
|
|
||||||
<item name="android:textColor">@color/white</item>
|
|
||||||
</style>
|
|
||||||
</resources>
|
</resources>
|
||||||
Loading…
Reference in New Issue