Skip to content

Commit b51a72d

Browse files
committed
its over
1 parent cbabc0d commit b51a72d

File tree

18 files changed

+53
-96
lines changed

18 files changed

+53
-96
lines changed

app/src/main/java/com/github/hintofbasil/crabbler/Questions/QuestionExpanders/ModeChooseExpander.java

+3-29
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,6 @@ public void expandLayout() throws JSONException {
5757
choiceOneTitleTwo.setText(getRichTextQuestionString("choiceOneTextTwo"));
5858
choiceTwoTitleTwo.setText(getRichTextQuestionString("choiceTwoTextTwo"));
5959

60-
TextView pageof = (TextView) activity.findViewById(R.id.page_of);
61-
pageof.setVisibility(View.GONE);
62-
63-
TextView backText = (TextView) activity.findViewById(R.id.backText);
64-
TextView forwardText = (TextView) activity.findViewById(R.id.forwardText);
65-
backText.setText(getRichTextQuestionString("backText"));
66-
forwardText.setText(getRichTextQuestionString("forwardText"));
67-
6860
chosenMode = -1;
6961

7062
try {
@@ -92,8 +84,7 @@ public void onClick(View v) {
9284
chosenMode = 0;
9385
choiceTwoButton.setBackgroundResource(R.color.questionBackground);
9486
choiceOneButton.setBackgroundResource(R.color.questionSelectedBackground);
95-
enableDisableNext();
96-
//nextQuestion(0);
87+
nextQuestion(0);
9788
}
9889
});
9990

@@ -104,31 +95,14 @@ public void onClick(View v) {
10495
chosenMode = 1;
10596
choiceOneButton.setBackgroundResource(R.color.questionBackground);
10697
choiceTwoButton.setBackgroundResource(R.color.questionSelectedBackground);
107-
enableDisableNext();
108-
//nextQuestion(0);
98+
nextQuestion(0);
10999
}
110100
});
111101
}
112102

113103
@Override
114104
protected void setPreviousAnswer(JSONArray answer) {
115-
try {
116-
Integer i = answer.getInt(0);
117-
switch(i) {
118-
case 0:
119-
choiceOneButton.setBackgroundResource(R.color.questionSelectedBackground);
120-
break;
121-
case 1:
122-
choiceTwoButton.setBackgroundResource(R.color.questionSelectedBackground);
123-
break;
124-
default:
125-
Log.d("TwoPictureLayoutExpande", "Invalid previous answer");
126-
}
127-
chosenMode = i;
128-
} catch (JSONException e) {
129-
Log.d("QuestionActivity", "No previous answer");
130-
return;
131-
}
105+
132106
}
133107

134108
@Override
99 Bytes
Loading

app/src/main/res/layout/expander_auto.xml

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
android:singleLine="true"
4141
android:layout_gravity="center_horizontal"
4242
android:textAlignment="center"
43+
android:layout_marginTop="20dp"
4344
android:textSize="45sp"
4445
android:textColor="@color/questionOfQuestionText"
4546
android:text="@string/app_name"

app/src/main/res/layout/expander_modechoose.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@
8181
android:layout_width="match_parent"
8282
android:layout_height="wrap_content"
8383
android:layout_margin="@dimen/question_select_margin"
84-
android:padding="@dimen/question_select_padding"
8584
android:layout_marginRight="@dimen/question_select_outside_margin"
8685
android:layout_centerHorizontal="true"
8786
android:orientation="horizontal"
@@ -176,6 +175,7 @@
176175
android:layout_alignParentBottom="true"
177176
android:layout_height="wrap_content"
178177
android:layout_width="match_parent"
178+
android:visibility="gone"
179179
/>
180180

181181
</RelativeLayout>

app/src/main/res/layout/expander_two_picture_choice.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
android:singleLine="true"
6666
android:layout_gravity="center_horizontal"
6767
android:textAlignment="center"
68-
android:textSize="28sp"
68+
android:textSize="25sp"
6969
android:textColor="@color/questionOfQuestionText"
7070
android:text=""
7171
/>
@@ -95,7 +95,7 @@
9595
android:singleLine="true"
9696
android:layout_gravity="center_horizontal"
9797
android:textAlignment="center"
98-
android:textSize="28sp"
98+
android:textSize="25sp"
9999
android:textColor="@color/questionOfQuestionText"
100100
android:text=""
101101
/>
2.31 KB
Loading
2.35 KB
Loading
1.66 KB
Loading
466 Bytes
Loading
-24 Bytes
Loading

app/src/main/res/raw-en/about_us.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
{
2323
"title": "How can you contribute?",
24-
"content": "REMAR does not have the financial resources to count the crabs performing andada in all states and localities in Brazil, therefore we need your help through the smartphone application REMAR<small>_CITIZEN</small>. With this smartphone application you can supply valuable information about the presence or absence of andada, at full or new moons, during the reproductive season of these crabs. With only 11 clicks (basic version) or 19 clicks (advanced version) you will have the chance to act as a citizen scientist contributing to the sustainable use of these important crabs which form the livelihoods of thousands of fishers."
24+
"content": "REMAR does not have the financial resources to count the crabs performing andada in all states and localities in Brazil, therefore we need your help through the smartphone application REMAR<small>_CITIZEN</small>. With this smartphone application you can supply valuable information about the presence or absence of andada, at full or new moons, during the reproductive season of these crabs. With only 10 clicks (basic version) or 18 clicks (advanced version) you will have the chance to act as a citizen scientist contributing to the sustainable use of these important crabs which form the livelihoods of thousands of fishers."
2525
},
2626
{
2727
"title": "Who are we?",

app/src/main/res/raw-en/questions.json

+3-14
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
"questionText": "",
66
"choiceOneTitle": "TestVersion",
77
"choiceOnePicture": "q0_0",
8-
"version": "0.9b"
8+
"version": "1.0"
99
},
1010
{
1111
"questionNumber": 1,
1212
"questionType": "ModeChoose",
1313
"questionPicture": "q0_(1:0)",
1414
"questionTitle": "crab_title_(1:0)",
15-
"description": "<b><i>For more information, click on the above yellow field.</i><br><br>Chose one of the below options by tapping with finger.</b>",
15+
"description": "<b><i>For more information, click on the above yellow field.</i><br><br><br><br>Chose one of the below options by tapping with finger.</b>",
1616
"choiceOneText": "<b>Simple<br>version</b>",
1717
"choiceOneTextTwo": "<b>REMAR<br>Basic</b>",
1818
"choiceTwoText": "<b>Full<br>version</b>",
@@ -184,19 +184,8 @@
184184
},
185185
{
186186
"questionNumber": 17,
187-
"questionType": "UserDetails",
188-
"questionPicture": "q0_(2:0)",
189-
"questionTitle": "crab_title_(2:0)",
190-
"description": "It would be good to know who you are so that we can add your name to the list of citizen-scientists of the REMAR project.<br>How can you be contacted most easily? Touch field and add email address or phone number.",
191-
"description2": "Touch field and type your name.",
192-
"postAs": "userDetails",
193-
"optional": true,
194-
"cacheAnswer": true
195-
},
196-
{
197-
"questionNumber": 18,
198187
"questionType": "Commit",
199-
"description": "",
188+
"description": "If you want to add your name to the list of citizen-scientists of the REMAR Project, send a message to [email protected]",
200189
"choiceOneText": "I WANT TO SUBMIT MY ANSWERS",
201190
"choiceTwoText": "GO BACK TO CHANGE ANSWERS"
202191
},

app/src/main/res/raw-en/questions2.json

+3-14
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
"questionText": "",
66
"choiceOneTitle": "TestVersion",
77
"choiceOnePicture": "q0_0",
8-
"version": "0.9b"
8+
"version": "1.0"
99
},
1010
{
1111
"questionNumber": 1,
1212
"questionType": "ModeChoose",
1313
"questionPicture": "q0_(1:0)",
1414
"questionTitle": "crab_title_(1:0)",
15-
"description": "<b><i>For more information, click on the above yellow field.</i><br><br>Chose one of the below options by tapping with finger.</b>",
15+
"description": "<b><i>For more information, click on the above yellow field.</i><br><br><br><br>Chose one of the below options by tapping with finger.</b>",
1616
"choiceOneText": "<b>Simple<br>version</b>",
1717
"choiceOneTextTwo": "<b>REMAR<br>Basic</b>",
1818
"choiceTwoText": "<b>Full<br>version</b>",
@@ -96,19 +96,8 @@
9696
},
9797
{
9898
"questionNumber": 9,
99-
"questionType": "UserDetails",
100-
"questionPicture": "q0_(2:0)",
101-
"questionTitle": "crab_title_(2:0)",
102-
"description": "It would be good to know who you are so that we can add your name to the list of citizen-scientists of the REMAR project.<br>How can you be contacted most easily? Touch field and add email address or phone number.",
103-
"description2": "Touch field and type your name.",
104-
"postAs": "userDetails",
105-
"optional": true,
106-
"cacheAnswer": true
107-
},
108-
{
109-
"questionNumber": 10,
11099
"questionType": "Commit",
111-
"description": "",
100+
"description": "If you want to add your name to the list of citizen-scientists of the REMAR Project, send a message to [email protected]",
112101
"choiceOneText": "I WANT TO SUBMIT MY ANSWERS",
113102
"choiceTwoText": "GO BACK TO CHANGE ANSWERS"
114103
},

app/src/main/res/raw/about_us.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
{
2323
"title": "Como você pode contribuir?",
24-
"content": "A REMAR não tem recursos para contar os caranguejos durante a andada em todos estados e localidades do Brasil, por isso precisamos da sua ajuda para, através do aplicativo REMAR<small>_CIDADÃO</small>, fornecer preciosas informações sobre presença e ausência de andadas após lua cheia e lua nova nos meses de reprodução dos caranguejos. Assim, com apenas 11 cliques (versão básico) ou 19 cliques (versão avançado), você terá a chance de atuar como um verdadeiro pesquisador e ainda contribuir para o uso sustentável de um importante recurso pesqueiro e para melhorar a qualidade de vida dos extrativistas."
24+
"content": "A REMAR não tem recursos para contar os caranguejos durante a andada em todos estados e localidades do Brasil, por isso precisamos da sua ajuda para, através do aplicativo REMAR<small>_CIDADÃO</small>, fornecer preciosas informações sobre presença e ausência de andadas após lua cheia e lua nova nos meses de reprodução dos caranguejos. Assim, com apenas 10 cliques (versão básico) ou 18 cliques (versão avançado), você terá a chance de atuar como um verdadeiro pesquisador e ainda contribuir para o uso sustentável de um importante recurso pesqueiro e para melhorar a qualidade de vida dos extrativistas."
2525
},
2626
{
2727
"title": "Quem somos?",

app/src/main/res/raw/questions.json

+3-14
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
"questionText": "",
66
"choiceOneTitle": "TestVersion",
77
"choiceOnePicture": "q0_0",
8-
"version": "0.9b"
8+
"version": "1.0"
99
},
1010
{
1111
"questionNumber": 1,
1212
"questionType": "ModeChoose",
1313
"questionPicture": "q0_(1:0)",
1414
"questionTitle": "crab_title_(1:0)",
15-
"description": "<b><i>Para mais informações, toque com dedo no botão amarelo \"Saiba mais\" acima.</i><br><br>Toque com dedo em uma das opções abaixo.</b>",
15+
"description": "<b><i>Para mais informações, toque com dedo no botão amarelo \"Saiba mais\" acima.</i><br><br><br><br>Toque com dedo em uma das opções abaixo.</b>",
1616
"choiceOneText": "<b>Quero<br>simplificar</b>",
1717
"choiceOneTextTwo": "<b>REMAR<br>Básico</b>",
1818
"choiceTwoText": "<b>Quero ajudar<br>ao máximo</b>",
@@ -184,19 +184,8 @@
184184
},
185185
{
186186
"questionNumber": 17,
187-
"questionType": "UserDetails",
188-
"questionPicture": "q0_(2:0)",
189-
"questionTitle": "crab_title_(2:0)",
190-
"description": "Seria bom saber quem você é para colocarmos o seu nome na lista de pesquisadores cidadãos da REMAR.<br>Qual a melhor forma para entramos em contato? Toque no espaço para escrever o seu email ou telefone (opcional).",
191-
"description2": "Toque no espaço para escrever o seu nome (opcional).",
192-
"postAs": "userDetails",
193-
"optional": true,
194-
"cacheAnswer": true
195-
},
196-
{
197-
"questionNumber": 18,
198187
"questionType": "Commit",
199-
"description": "",
188+
"description": "Caso queira colocar o seu nome na lista de pesquisadores cidadãos da REMAR, envie uma mensagem para [email protected]",
200189
"choiceOneText": "QUERO MANDAR AS MINHAS RESPOSTAS",
201190
"choiceTwoText": "VOLTE PARA MUDAR AS RESPOSTAS"
202191
},

app/src/main/res/raw/questions2.json

+3-14
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
"questionText": "",
66
"choiceOneTitle": "TestVersion",
77
"choiceOnePicture": "q0_0",
8-
"version": "0.9b"
8+
"version": "1.0"
99
},
1010
{
1111
"questionNumber": 1,
1212
"questionType": "ModeChoose",
1313
"questionPicture": "q0_(1:0)",
1414
"questionTitle": "crab_title_(1:0)",
15-
"description": "<b><i>Para mais informações, toque com dedo no botão amarelo \"Saiba mais\" acima.</i><br><br>Toque com dedo em uma das opções abaixo.</b>",
15+
"description": "<b><i>Para mais informações, toque com dedo no botão amarelo \"Saiba mais\" acima.</i><br><br><br><br>Toque com dedo em uma das opções abaixo.</b>",
1616
"choiceOneText": "<b>Quero<br>simplificar</b>",
1717
"choiceOneTextTwo": "<b>REMAR<br>Básico</b>",
1818
"choiceTwoText": "<b>Quero ajudar<br>ao máximo</b>",
@@ -96,19 +96,8 @@
9696
},
9797
{
9898
"questionNumber": 9,
99-
"questionType": "UserDetails",
100-
"questionPicture": "q0_(2:0)",
101-
"questionTitle": "crab_title_(2:0)",
102-
"description": "Seria bom saber quem você é para colocarmos o seu nome na lista de pesquisadores cidadãos da REMAR.<br>Qual a melhor forma para entramos em contato? Toque no espaço para escrever o seu email ou telefone (opcional).",
103-
"description2": "Toque no espaço para escrever o seu nome (opcional).",
104-
"postAs": "userDetails",
105-
"optional": true,
106-
"cacheAnswer": true
107-
},
108-
{
109-
"questionNumber": 10,
11099
"questionType": "Commit",
111-
"description": "",
100+
"description": "Caso queira colocar o seu nome na lista de pesquisadores cidadãos da REMAR, envie uma mensagem para [email protected]",
112101
"choiceOneText": "QUERO MANDAR AS MINHAS RESPOSTAS",
113102
"choiceTwoText": "VOLTE PARA MUDAR AS RESPOSTAS"
114103
},

app/src/main/res/values-en/strings.xml

+31-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
<resources>
2-
<string name="app_name">REMAR_Citizen</string>
2+
<string name="app_name">REMAR Citizen</string>
33
<string name="description">Monitoring Mass Mating Events of Mangrove Crabs</string>
44

55
<string name="toolbar_app_name">REMAR_</string>
66
<string name="toolbar_app_sub_name">CITIZEN</string>
77

88
<string name="internal_error">An internal error occurred. Please restart.</string>
99

10+
<string name="back_button">Previous</string>
11+
<string name="forward_button">Forward</string>
12+
<string name="about_us">About Us</string>
13+
<string name="settings">Settings</string>
14+
1015
<string name="yes">Yes</string>
1116
<string name="no">No</string>
1217
<string name="maybe">I don\'t know</string>
@@ -45,6 +50,29 @@
4550
<item>December</item>
4651
</string-array>
4752

53+
<string-array name="years">
54+
<item>2016</item>
55+
<item>2017</item>
56+
<item>2018</item>
57+
<item>2019</item>
58+
<item>2020</item>
59+
<item>2021</item>
60+
<item>2022</item>
61+
<item>2023</item>
62+
<item>2024</item>
63+
<item>2025</item>
64+
</string-array>
65+
66+
<string-array name="pref_postFrequency_values">
67+
<item>60000</item>
68+
<item>300000</item>
69+
<item>900000</item>
70+
<item>3600000</item>
71+
<item>10800000</item>
72+
<item>86400000</item>
73+
</string-array>
74+
<string name="pref_postFrequency_default">3600000</string>
75+
4876
<string name="pref_postFrequency_title">Post Frequency</string>
4977
<string name="pref_postFrequency_summary">The frequency with which the app attempts to post answers to the web.</string>
5078
<string-array name="pref_postFrequency_entries">
@@ -69,12 +97,10 @@
6997

7098
<string name="protectedText">Touch field and type the name of the protected area where you observed andada</string>
7199

72-
<string name="lo">Low</string>
73-
<string name="mid">Intermediate</string>
74-
<string name="high">High</string>
100+
<string name="url_login">http://40180582.pythonanywhere.com/static/login</string>
101+
<string name="preference_session_id">session_id</string>
75102

76103
<string name="back_next_description_text"></string>
77-
<string name="becomescience"></string>
78104

79105
<string name="TestVersion">TEST Version</string>
80106
<string name="test2">This is a test! Two</string>

app/src/main/res/values/strings.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<resources>
2-
<string name="app_name">REMAR_Cidadão</string>
2+
<string name="app_name">REMAR Cidadão</string>
33
<string name="description">Monitoramento de andadas reprodutivas de caranguejos de manguezal</string>
44

55
<string name="toolbar_app_name">REMAR_</string>

0 commit comments

Comments
 (0)