Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
95ba792a
authored
Feb 09, 2016
by
Miguel Ángel García Cumbreras
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Pequeños errores corregidos
parent
3cc032d3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
31 deletions
android/Pictogram/app/src/main/java/com/yottacode/pictogram/gui/SerialActivity.java
android/Pictogram/app/src/main/java/com/yottacode/pictogram/gui/TapeAdapter.java
android/Pictogram/app/src/main/res/layout/activity_pictogram.xml
android/Pictogram/app/src/main/res/layout/activity_splash_screen.xml
android/Pictogram/app/src/main/java/com/yottacode/pictogram/gui/SerialActivity.java
View file @
95ba792a
...
@@ -183,8 +183,8 @@ public class SerialActivity extends Activity implements iRestapiListener, iImgDo
...
@@ -183,8 +183,8 @@ public class SerialActivity extends Activity implements iRestapiListener, iImgDo
String
password
=
mSerialViewPass
.
getText
().
toString
();
String
password
=
mSerialViewPass
.
getText
().
toString
();
// DE PRUEBA
// DE PRUEBA
// Alumno
// Alumno
//
username = "faf0001";
username
=
"faf0001"
;
//
password = "faf0001";
password
=
"faf0001"
;
// Supervisor
// Supervisor
//username = "dofer@ujaen.es";
//username = "dofer@ujaen.es";
//password = "dofer";
//password = "dofer";
...
@@ -266,14 +266,23 @@ public class SerialActivity extends Activity implements iRestapiListener, iImgDo
...
@@ -266,14 +266,23 @@ public class SerialActivity extends Activity implements iRestapiListener, iImgDo
String
st_lang
=
user
.
getString
(
TAG_LANG
);
String
st_lang
=
user
.
getString
(
TAG_LANG
);
String
st_attributes
=
user
.
getString
(
TAG_ATTRIBUTES
);
String
st_attributes
=
user
.
getString
(
TAG_ATTRIBUTES
);
users
.
add
(
new
User
(
st_id_int
,
st_name
,
st_surname
,
st_pic
,
st_gender
,
st_lang
,
st_attributes
,
//users=PCBcontext.getDevice().getUsers();
-
1
,
""
,
""
,
""
,
"M"
,
"es-es"
,
""
));
//if (users.contains(user)) users.remove(user);
User
student
=
new
User
(
st_id_int
,
st_name
,
st_surname
,
st_pic
,
st_gender
,
st_lang
,
st_attributes
,
-
1
,
""
,
""
,
""
,
"M"
,
"es-es"
,
""
);
users
.
add
(
student
);
Log
.
d
(
LOG_TAG
,
"jsonToken válido:"
+
jsonToken
);
Log
.
d
(
LOG_TAG
,
"jsonToken válido:"
+
jsonToken
);
User
student
=
PCBcontext
.
getDevice
().
findUser
(
st_id
,
-
1
);
//User student = PCBcontext.getDevice().findUser(st_id_int, -1);
//Log.d(LOG_TAG, "student id:" + student.get_id_stu());
PCBcontext
.
set_user
(
student
,
jsonToken
,
null
);
PCBcontext
.
set_user
(
student
,
jsonToken
,
null
);
PCBcontext
.
getDevice
().
synchronizeUsers
(
users
,
this
);
PCBcontext
.
getDevice
().
synchronizeUsers
(
users
,
this
);
PCBcontext
.
getDevice
().
deleteDeprecatedImgs
();
PCBcontext
.
getDevice
().
deleteDeprecatedImgs
();
}
else
{
}
else
{
// Es un Supervisor
// Es un Supervisor
Log
.
d
(
LOG_TAG
,
"Es un SUPERVISOR. Sigo..."
);
Log
.
d
(
LOG_TAG
,
"Es un SUPERVISOR. Sigo..."
);
...
@@ -322,6 +331,13 @@ public class SerialActivity extends Activity implements iRestapiListener, iImgDo
...
@@ -322,6 +331,13 @@ public class SerialActivity extends Activity implements iRestapiListener, iImgDo
@Override
@Override
public
void
loadComplete
()
{
public
void
loadComplete
()
{
Log
.
d
(
LOG_TAG
,
"Load images complete"
);
Log
.
d
(
LOG_TAG
,
"Load images complete"
);
/*
User student = PCBcontext.getDevice().findUser(st_id, -1);
Log.d(LOG_TAG, "student:" + student.get_name_stu());
PCBcontext.set_user(student, jsonToken, null);
*/
//close the progress dialog
//close the progress dialog
progressDialog
.
dismiss
();
progressDialog
.
dismiss
();
// Entro directamente a Pictogram con ese alumno
// Entro directamente a Pictogram con ese alumno
...
...
android/Pictogram/app/src/main/java/com/yottacode/pictogram/gui/TapeAdapter.java
View file @
95ba792a
...
@@ -112,9 +112,10 @@ public class TapeAdapter extends BaseAdapter {
...
@@ -112,9 +112,10 @@ public class TapeAdapter extends BaseAdapter {
if
(
convertView
==
null
){
if
(
convertView
==
null
){
view
=
new
ImageView
(
PCBcontext
.
getContext
());
view
=
new
ImageView
(
PCBcontext
.
getContext
());
// Ancho y alto de la imagen en la vista donde se va a colocar (en pixels)
// Ancho y alto de la imagen en la vista donde se va a colocar (en pixels)
view
.
setLayoutParams
(
new
GridView
.
LayoutParams
(
getPx
(
90
),
getPx
(
7
0
)));
view
.
setLayoutParams
(
new
GridView
.
LayoutParams
(
getPx
(
80
),
getPx
(
6
0
)));
view
.
setScaleType
(
ImageView
.
ScaleType
.
CENTER_CROP
);
view
.
setScaleType
(
ImageView
.
ScaleType
.
CENTER_CROP
);
view
.
setPadding
(
10
,
15
,
10
,
10
);
view
.
setPadding
(
5
,
10
,
5
,
5
);
//view.setPadding(10,15,10,10);
}
else
{
}
else
{
view
=
(
ImageView
)
convertView
;
view
=
(
ImageView
)
convertView
;
}
}
...
@@ -133,21 +134,6 @@ public class TapeAdapter extends BaseAdapter {
...
@@ -133,21 +134,6 @@ public class TapeAdapter extends BaseAdapter {
return
(
int
)
(
dimensionDp
*
density
+
0.5f
);
return
(
int
)
(
dimensionDp
*
density
+
0.5f
);
}
}
// NO SE ESTÄ USANDO ACTUALMENTE
public
void
ttsAll
(){
// NOTA: coger todas las palabras de la cinta
String
input
=
lPictos
.
getFirst
().
get_translation
();
Log
.
d
(
"TapeAdapterPictos.java"
,
"Traduccion picto: "
+
input
);
// Create TTS object
TTSHelper
tts
=
new
TTSHelper
(
PCBcontext
.
getContext
(),
"IVONA Text-to-Speech HQ"
);
//tts = new TTSHelper(this.mContext);
tts
.
createTTS
(
PCBcontext
.
getContext
(),
"IVONA Text-to-Speech HQ"
);
tts
.
setVoice
(
PCBcontext
.
getContext
(),
"es"
);
// DE PRUEBA
//input = "Hola Salud. ¿No te has ido hoy de fiesta?";
tts
.
speakText
(
input
);
}
@TargetApi
(
Build
.
VERSION_CODES
.
LOLLIPOP
)
@TargetApi
(
Build
.
VERSION_CODES
.
LOLLIPOP
)
public
void
ttsAllNew
(
TextToSpeech
tts
){
public
void
ttsAllNew
(
TextToSpeech
tts
){
// DE PRUEBA
// DE PRUEBA
...
...
android/Pictogram/app/src/main/res/layout/activity_pictogram.xml
View file @
95ba792a
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<GridView
<GridView
android:id=
"@+id/tape_grid_view"
android:id=
"@+id/tape_grid_view"
android:layout_width=
"
56
0dp"
android:layout_width=
"
85
0dp"
android:layout_height=
"85dp"
android:layout_height=
"85dp"
android:gravity=
"center"
android:gravity=
"center"
android:numColumns=
"@integer/columns"
android:numColumns=
"@integer/columns"
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<ImageButton
<ImageButton
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingLeft=
"8
0
0dp"
android:paddingLeft=
"8
5
0dp"
android:paddingTop=
"20dp"
android:paddingTop=
"20dp"
android:src=
"@drawable/back64"
android:src=
"@drawable/back64"
android:background=
"@null"
android:background=
"@null"
...
@@ -45,16 +45,15 @@
...
@@ -45,16 +45,15 @@
android:id=
"@+id/button_tts"
android:id=
"@+id/button_tts"
android:layout_toRightOf=
"@+id/tape_grid_view"
android:layout_toRightOf=
"@+id/tape_grid_view"
android:layout_alignParentTop=
"true"
android:layout_alignParentTop=
"true"
android:adjustViewBounds=
"true"
android:adjustViewBounds=
"true"
/>
android:maxHeight =
"85dp"
/>
<GridView
<GridView
android:id=
"@+id/panel_grid_view"
android:id=
"@+id/panel_grid_view"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:paddingTop=
"20dp"
android:paddingTop=
"20dp"
android:columnWidth=
"1
2
0dp"
android:columnWidth=
"1
0
0dp"
android:verticalSpacing=
"
20
dp"
android:verticalSpacing=
"
15
dp"
android:horizontalSpacing=
"5dp"
android:horizontalSpacing=
"5dp"
android:stretchMode=
"columnWidth"
android:stretchMode=
"columnWidth"
android:layout_below=
"@+id/tape_grid_view"
>
android:layout_below=
"@+id/tape_grid_view"
>
...
...
android/Pictogram/app/src/main/res/layout/activity_splash_screen.xml
View file @
95ba792a
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
android:src=
"@drawable/yottalogo72p"
android:src=
"@drawable/yottalogo72p"
android:layout_alignParentTop=
"true"
android:layout_alignParentTop=
"true"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"1
4
0dp"
/>
android:layout_marginTop=
"1
2
0dp"
/>
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
android:src=
"@drawable/logo_pictogram"
android:src=
"@drawable/logo_pictogram"
android:layout_alignParentBottom=
"true"
android:layout_alignParentBottom=
"true"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginBottom=
"1
51
dp"
android:layout_marginBottom=
"1
20
dp"
android:id=
"@+id/imageView"
/>
android:id=
"@+id/imageView"
/>
<TextView
<TextView
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
android:textAppearance=
"?android:attr/textAppearanceMedium"
android:textAppearance=
"?android:attr/textAppearanceMedium"
android:text=
"Pictogram"
android:text=
"Pictogram"
android:id=
"@+id/textView3"
android:id=
"@+id/textView3"
android:paddingTop=
"
5
0dp"
android:paddingTop=
"
7
0dp"
android:layout_alignBottom=
"@+id/imageView"
android:layout_alignBottom=
"@+id/imageView"
android:layout_centerHorizontal=
"true"
/>
android:layout_centerHorizontal=
"true"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment