Pequeños errores corregidos

parent 3cc032d3
......@@ -183,8 +183,8 @@ public class SerialActivity extends Activity implements iRestapiListener, iImgDo
String password = mSerialViewPass.getText().toString();
// DE PRUEBA
// Alumno
//username = "faf0001";
//password = "faf0001";
username = "faf0001";
password = "faf0001";
// Supervisor
//username = "dofer@ujaen.es";
//password = "dofer";
......@@ -266,14 +266,23 @@ public class SerialActivity extends Activity implements iRestapiListener, iImgDo
String st_lang = user.getString(TAG_LANG);
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,
-1, "", "", "", "M", "es-es", ""));
//users=PCBcontext.getDevice().getUsers();
//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);
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.getDevice().synchronizeUsers(users, this);
PCBcontext.getDevice().deleteDeprecatedImgs();
} else{
// Es un Supervisor
Log.d(LOG_TAG, "Es un SUPERVISOR. Sigo...");
......@@ -322,6 +331,13 @@ public class SerialActivity extends Activity implements iRestapiListener, iImgDo
@Override
public void loadComplete() {
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
progressDialog.dismiss();
// Entro directamente a Pictogram con ese alumno
......
......@@ -112,9 +112,10 @@ public class TapeAdapter extends BaseAdapter {
if(convertView == null){
view = new ImageView(PCBcontext.getContext());
// Ancho y alto de la imagen en la vista donde se va a colocar (en pixels)
view.setLayoutParams(new GridView.LayoutParams(getPx(90), getPx(70)));
view.setLayoutParams(new GridView.LayoutParams(getPx(80), getPx(60)));
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{
view = (ImageView) convertView;
}
......@@ -133,21 +134,6 @@ public class TapeAdapter extends BaseAdapter {
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)
public void ttsAllNew(TextToSpeech tts){
// DE PRUEBA
......
......@@ -15,7 +15,7 @@
<GridView
android:id="@+id/tape_grid_view"
android:layout_width="560dp"
android:layout_width="850dp"
android:layout_height="85dp"
android:gravity="center"
android:numColumns="@integer/columns"
......@@ -28,7 +28,7 @@
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="800dp"
android:paddingLeft="850dp"
android:paddingTop="20dp"
android:src="@drawable/back64"
android:background="@null"
......@@ -45,16 +45,15 @@
android:id="@+id/button_tts"
android:layout_toRightOf="@+id/tape_grid_view"
android:layout_alignParentTop="true"
android:adjustViewBounds="true"
android:maxHeight = "85dp"/>
android:adjustViewBounds="true"/>
<GridView
android:id="@+id/panel_grid_view"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:paddingTop="20dp"
android:columnWidth="120dp"
android:verticalSpacing="20dp"
android:columnWidth="100dp"
android:verticalSpacing="15dp"
android:horizontalSpacing="5dp"
android:stretchMode="columnWidth"
android:layout_below="@+id/tape_grid_view">
......
......@@ -15,7 +15,7 @@
android:src="@drawable/yottalogo72p"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="140dp" />
android:layout_marginTop="120dp" />
<TextView
android:layout_width="wrap_content"
......@@ -34,7 +34,7 @@
android:src="@drawable/logo_pictogram"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="151dp"
android:layout_marginBottom="120dp"
android:id="@+id/imageView" />
<TextView
......@@ -43,7 +43,7 @@
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Pictogram"
android:id="@+id/textView3"
android:paddingTop="50dp"
android:paddingTop="70dp"
android:layout_alignBottom="@+id/imageView"
android:layout_centerHorizontal="true" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment