Commit ac0ad839 by Fernando Martínez Santiago

Merge branch 'master' of http://scm.ujaen.es/softuno/pictogram

parents b438422c e5eac320
...@@ -3,10 +3,12 @@ apply plugin: 'com.android.application' ...@@ -3,10 +3,12 @@ apply plugin: 'com.android.application'
android { android {
signingConfigs { signingConfigs {
release_config { release_config {
/*
storeFile file('F:/Users/Fernando/GoogleDrive/tmp/keystore.jks') storeFile file('F:/Users/Fernando/GoogleDrive/tmp/keystore.jks')
keyAlias 'default_key' keyAlias 'default_key'
keyPassword 'danoia' keyPassword 'danoia'
storePassword 'danoia' storePassword 'danoia'
*/
} }
} }
compileSdkVersion 21 compileSdkVersion 21
...@@ -23,7 +25,7 @@ android { ...@@ -23,7 +25,7 @@ android {
release { release {
minifyEnabled false minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
resValue "string", "server", "https://pre.yottacode.com:1337" resValue "string", "server", "https://pre.yottacode.com"
resValue "string", "db_name", "PCB.db" resValue "string", "db_name", "PCB.db"
resValue "bool", "force_db_create", "false" resValue "bool", "force_db_create", "false"
resValue "bool", "ssl_connect", "false" resValue "bool", "ssl_connect", "false"
...@@ -52,7 +54,7 @@ android { ...@@ -52,7 +54,7 @@ android {
resValue "string", "server", "https://192.168.1.37:1337" resValue "string", "server", "https://192.168.1.37:1337"
} }
DefaultFlavor { DefaultFlavor {
resValue "string", "server", "https://pre.yottacode.com:1337" resValue "string", "server", "https://pre.yottacode.com"
signingConfig signingConfigs.release_config signingConfig signingConfigs.release_config
} }
ArturoFlavorNoSSL { ArturoFlavorNoSSL {
......
...@@ -37,17 +37,11 @@ ...@@ -37,17 +37,11 @@
android:name=".gui.MainActivity" android:name=".gui.MainActivity"
android:label="@string/app_name" android:label="@string/app_name"
android:screenOrientation="landscape"> android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity> </activity>
<activity <activity
android:name=".gui.SerialActivity" android:name=".gui.SerialActivity"
android:label="@string/title_activity_serial" android:label="@string/title_activity_serial"
android:screenOrientation="landscape"> android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity> </activity>
<activity <activity
android:name=".gui.LoginActivity" android:name=".gui.LoginActivity"
...@@ -55,17 +49,6 @@ ...@@ -55,17 +49,6 @@
android:label="@string/title_activity_login_activity_fragments" android:label="@string/title_activity_login_activity_fragments"
android:screenOrientation="landscape"/> android:screenOrientation="landscape"/>
<activity <activity
android:name="com.yottacode.pictogrammar.UploadActivity"
android:label="@string/app_name"
android:launchMode="singleTop"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".gui.PictogramActivity" android:name=".gui.PictogramActivity"
android:exported="true" android:exported="true"
android:label="@string/app_name" android:label="@string/app_name"
......
...@@ -177,15 +177,14 @@ public class RestapiWrapper { ...@@ -177,15 +177,14 @@ public class RestapiWrapper {
os.close(); os.close();
int responseCode=urlConnection.getResponseCode(); int responseCode=urlConnection.getResponseCode();
if (responseCode == HttpsURLConnection.HTTP_OK) { Log.d(LOG_TAG, "RESPONSECODE: " + responseCode);
String line;
BufferedReader br=new BufferedReader(new InputStreamReader(urlConnection.getInputStream())); String line;
while ((line=br.readLine()) != null) { BufferedReader br = new BufferedReader(new InputStreamReader(responseCode == HttpsURLConnection.HTTP_OK
response+=line; ? urlConnection.getInputStream()
} : urlConnection.getErrorStream()));
} while ((line=br.readLine()) != null) {
else { response+=line;
response="";
} }
} catch (IOException e) { } catch (IOException e) {
Log.e(com.yottacode.net.RestapiWrapper.class.getName(), "Error:" + e.getLocalizedMessage() + " when asking for " + surl); Log.e(com.yottacode.net.RestapiWrapper.class.getName(), "Error:" + e.getLocalizedMessage() + " when asking for " + surl);
...@@ -228,6 +227,7 @@ public class RestapiWrapper { ...@@ -228,6 +227,7 @@ public class RestapiWrapper {
@Override @Override
protected void onPostExecute(HttpAsyncTaskParams params) { protected void onPostExecute(HttpAsyncTaskParams params) {
try { try {
//if (params.e)
if(params.result!=null) { if(params.result!=null) {
Log.d(LOG_TAG, "JSON: " + params.result); Log.d(LOG_TAG, "JSON: " + params.result);
......
...@@ -33,6 +33,8 @@ import org.json.JSONException; ...@@ -33,6 +33,8 @@ import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
import java.io.IOException; import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Vector; import java.util.Vector;
/** /**
...@@ -42,7 +44,7 @@ import java.util.Vector; ...@@ -42,7 +44,7 @@ import java.util.Vector;
* @version 1.0 * @version 1.0
*/ */
public class LoginActivity extends FragmentActivity implements iRestapiListener { public class LoginActivity extends FragmentActivity implements iRestapiListener{
private static final String TAG_ID = "id"; private static final String TAG_ID = "id";
private static final String TAG_NAME = "name"; private static final String TAG_NAME = "name";
...@@ -154,8 +156,6 @@ public class LoginActivity extends FragmentActivity implements iRestapiListener ...@@ -154,8 +156,6 @@ public class LoginActivity extends FragmentActivity implements iRestapiListener
public void result(JSONArray students_supervisors) { //FERNANDO public void result(JSONArray students_supervisors) { //FERNANDO
try { try {
// Saco los pares estudiante-supervisor // Saco los pares estudiante-supervisor
//Log.d(LOG_TAG, "JSON:"+students_supervisors);
Log.d(LOG_TAG, "students_supervisors size:" + students_supervisors.length());
// looping through All Students // looping through All Students
Vector<User> users = new Vector<User>(students_supervisors.length()); Vector<User> users = new Vector<User>(students_supervisors.length());
...@@ -205,64 +205,73 @@ public class LoginActivity extends FragmentActivity implements iRestapiListener ...@@ -205,64 +205,73 @@ public class LoginActivity extends FragmentActivity implements iRestapiListener
} }
} }
Log.d(LOG_TAG, "users size:" + users.size());
// Si sólo hay 1 estudiante, cargo el st_id // Si sólo hay 1 estudiante, cargo el st_id
if (students_supervisors.length() == 1) if (users.size() == 1){
//User student = PCBcontext.getDevice().findUser(st_id_int, sup_id);
PCBcontext.set_user(student, token, null); // no hay que hacer nada cuando termine
} else{
student = new User(-1, "", "", "", "M", "es-es", "",
sup_id, "", "", "", "M", "es-es", "");
PCBcontext.set_user(student, token, new iImgDownloaderListener() { PCBcontext.set_user(student, token, new iImgDownloaderListener() {
@Override @Override
public void loadComplete() { public void loadComplete() {
Log.d(LOG_TAG, "Images: Load images complete"); //close the progress dialog
progressDialog.dismiss(); //progressDialog.dismiss();
setContentView(R.layout.activity_login); //setContentView(R.layout.activity_login);
} }
// De la interfaz iImgDownloaderListener
@Override @Override
public void loadImg(Img img) { public void loadImg(Img image) {
//close the progress dialog
//progressDialog.dismiss();
//setContentView(R.layout.activity_login);
} }
}); else{ });
student = new User(-1, "", "", "", "M", "es-es", "",
sup_id, "", "", "", "M", "es-es", "");
PCBcontext.set_user(student, token, null);
} }
//Device device = new Device(getApplicationContext(), null, 1); //Device device = new Device(getApplicationContext(), null, 1);
if (users.size() > 0){ if (users.size() > 0){
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
String currentDateandTime = sdf.format(new Date());
Log.d(LOG_TAG, "Entro en synchronizeUsers en " + currentDateandTime);
PCBcontext.getDevice().synchronizeUsers(users, new iImgDownloaderListener() { PCBcontext.getDevice().synchronizeUsers(users, new iImgDownloaderListener() {
@Override @Override
public void loadComplete() { public void loadComplete() {
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
} String currentDateandTime = sdf.format(new Date());
Log.d(LOG_TAG, "LoadComplete en " + currentDateandTime);
@Override Vector<User> users = null;
public void loadImg(Img img) { try {
users = PCBcontext.getDevice().getUsers();
Log.d(LOG_TAG, "Load a single image with ID: " + img.get_id()); } catch (JSONException e) {
// Aquí filtro si sólo tiene un único usuario o varios e.printStackTrace();
Vector<User> users = null; }
try { if (users.size() > 1) {
users = PCBcontext.getDevice().getUsers(); //close the progress dialog
if (users.size() > 1) { progressDialog.dismiss();
setContentView(R.layout.activity_login); setContentView(R.layout.activity_login);
} }
} catch (JSONException e) { }
e.printStackTrace();
}
}
});
PCBcontext.getDevice().deleteDeprecatedImgs();
// Si sólo hay 1 estudiante paso a Pictogram
if(users.size()==1)
{ @Override
//close the progress dialog public void loadImg(Img image) {
progressDialog.dismiss();
Intent pictogramActivity = new Intent(this, PictogramActivity.class);
startActivity(pictogramActivity);
} }
}else{ });
PCBcontext.getDevice().deleteDeprecatedImgs();
// Si sólo hay 1 estudiante paso a Pictogram
if (users.size() == 1){
//close the progress dialog
progressDialog.dismiss();
Intent pictogramActivity = new Intent(this, PictogramActivity.class);
pictogramActivity.putExtra("isSupervisor",true);
startActivity(pictogramActivity);
}
} else {
AlertDialog.Builder builder = AlertDialog.Builder builder =
new AlertDialog.Builder(this); new AlertDialog.Builder(this);
...@@ -289,9 +298,8 @@ public class LoginActivity extends FragmentActivity implements iRestapiListener ...@@ -289,9 +298,8 @@ public class LoginActivity extends FragmentActivity implements iRestapiListener
public void result(JSONObject result) { public void result(JSONObject result) {
} }
@Override protected void onResume() { @Override protected void onResume() {
super.onResume(); super.onResume();
Toast.makeText(this, "onResume", Toast.LENGTH_SHORT).show(); Toast.makeText(this, "onResume", Toast.LENGTH_SHORT).show();
} }
} }
\ No newline at end of file
...@@ -4,6 +4,7 @@ import android.app.Activity; ...@@ -4,6 +4,7 @@ import android.app.Activity;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.content.ServiceConnection; import android.content.ServiceConnection;
import android.database.Cursor;
import android.graphics.Color; import android.graphics.Color;
import android.graphics.Point; import android.graphics.Point;
...@@ -12,7 +13,9 @@ import android.content.ClipDescription; ...@@ -12,7 +13,9 @@ import android.content.ClipDescription;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.provider.MediaStore;
import android.provider.Settings; import android.provider.Settings;
import android.speech.tts.TextToSpeech; import android.speech.tts.TextToSpeech;
import android.util.Log; import android.util.Log;
...@@ -81,6 +84,10 @@ public class PictogramActivity extends Activity implements iVocabularyListener, ...@@ -81,6 +84,10 @@ public class PictogramActivity extends Activity implements iVocabularyListener,
private int count_deletelong = 0; private int count_deletelong = 0;
private boolean isSupervisor = false;
private String selectedImagePath;
private static final int SELECT_PICTURE = 1;
/* /*
float xAxis = 0f; float xAxis = 0f;
float yAxis = 0f; float yAxis = 0f;
...@@ -95,6 +102,13 @@ public class PictogramActivity extends Activity implements iVocabularyListener, ...@@ -95,6 +102,13 @@ public class PictogramActivity extends Activity implements iVocabularyListener,
requestWindowFeature(Window.FEATURE_NO_TITLE); requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_pictogram); setContentView(R.layout.activity_pictogram);
Intent intent=getIntent();
isSupervisor = intent.getBooleanExtra("isSupervisor", false);
//isSupervisor = true;// QUITAR
//Log.d(LOG_TAG, "isSupervisor vale " + isSupervisor);
context = this; context = this;
actualCategory = null; // this for refresh vocabulary when a websocket action arrived from the dashboard actualCategory = null; // this for refresh vocabulary when a websocket action arrived from the dashboard
...@@ -183,7 +197,7 @@ public class PictogramActivity extends Activity implements iVocabularyListener, ...@@ -183,7 +197,7 @@ public class PictogramActivity extends Activity implements iVocabularyListener,
*/ */
final GridView panelGridView = (GridView) findViewById(R.id.panel_grid_view); final GridView panelGridView = (GridView) findViewById(R.id.panel_grid_view);
//final ImageButton deleteButton = (ImageButton) findViewById(R.id .button_delete); final ImageButton deleteButton = (ImageButton) findViewById(R.id .button_delete);
//final Button deleteAllButton = (Button) findViewById(R.id.button_delete_all); //final Button deleteAllButton = (Button) findViewById(R.id.button_delete_all);
final ImageButton ttsButton = (ImageButton) findViewById(R.id.button_tts); final ImageButton ttsButton = (ImageButton) findViewById(R.id.button_tts);
...@@ -288,26 +302,47 @@ public class PictogramActivity extends Activity implements iVocabularyListener, ...@@ -288,26 +302,47 @@ public class PictogramActivity extends Activity implements iVocabularyListener,
panelGridView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() { panelGridView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
@Override @Override
public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) { public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
ClipData.Item item = new ClipData.Item("" + position); if (isSupervisor){
String[] mimeTypes = {ClipDescription.MIMETYPE_TEXT_PLAIN}; // Si es supervisor al hacer longClick deshabilito ese pictograma o lo habilito
ClipData data = new ClipData("" + position, mimeTypes, item); Picto p = panelAdapter.getItem(position);
if (p==null){
Picto p = panelAdapter.getItem(position); // No tengo pictograma. Abro una nueva ventana de selección desde el Carrete del device
Log.d(LOG_TAG, "No tengo pictograma. Abro carrete...");
chooseImage();
// ...
}
else if (p.is_enabled()){
// Lo deshabilito
Log.d(LOG_TAG, "Lo deshabilitaría");
// ....
} else if (!p.is_enabled()){
// Lo habilito
Log.d(LOG_TAG, "Lo habilitaría");
// ....
}
if (p!=null && !p.is_invisible() && p.is_enabled()){ } else{
// If is not the blank picto, it isn't invisible or disabled ClipData.Item item = new ClipData.Item("" + position);
if(p.get_id() != 0 && String[] mimeTypes = {ClipDescription.MIMETYPE_TEXT_PLAIN};
!p.get_status().equalsIgnoreCase("invisible") && ClipData data = new ClipData("" + position, mimeTypes, item);
!p.get_status().equalsIgnoreCase("disabled") &&
tapeAdapter.getCount() < 8) { Picto p = panelAdapter.getItem(position);
View.DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(view);
if (p!=null && !p.is_invisible() && p.is_enabled()){
view.startDrag(data, //data to be dragged // If is not the blank picto, it isn't invisible or disabled
shadowBuilder, //drag shadow if(p.get_id() != 0 &&
view, //local data about the drag and drop operation !p.get_status().equalsIgnoreCase("invisible") &&
0 //no needed flags !p.get_status().equalsIgnoreCase("disabled") &&
); tapeAdapter.getCount() < 8) {
//view.setVisibility(View.INVISIBLE); View.DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(view);
view.startDrag(data, //data to be dragged
shadowBuilder, //drag shadow
view, //local data about the drag and drop operation
0 //no needed flags
);
//view.setVisibility(View.INVISIBLE);
}
} }
} }
return true; return true;
...@@ -315,6 +350,7 @@ public class PictogramActivity extends Activity implements iVocabularyListener, ...@@ -315,6 +350,7 @@ public class PictogramActivity extends Activity implements iVocabularyListener,
}); });
// onLongClick picto del tapeGridView (para empezar a arrastrarlo fuera del tape y eliminar de ahí) // onLongClick picto del tapeGridView (para empezar a arrastrarlo fuera del tape y eliminar de ahí)
/*
tapeGridView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() { tapeGridView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
@Override @Override
public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) { public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
...@@ -334,6 +370,7 @@ public class PictogramActivity extends Activity implements iVocabularyListener, ...@@ -334,6 +370,7 @@ public class PictogramActivity extends Activity implements iVocabularyListener,
return true; return true;
} }
}); });
*/
// onClick ttsButton (enviar frase a server o guardar en log local) // onClick ttsButton (enviar frase a server o guardar en log local)
ttsButton.setOnClickListener(new View.OnClickListener() { ttsButton.setOnClickListener(new View.OnClickListener() {
...@@ -363,7 +400,7 @@ public class PictogramActivity extends Activity implements iVocabularyListener, ...@@ -363,7 +400,7 @@ public class PictogramActivity extends Activity implements iVocabularyListener,
} }
}); });
/* onClick deleteButton (eliminar del tape el último picto) // onClick deleteButton (eliminar del tape el último picto)
deleteButton.setOnClickListener(new View.OnClickListener() { deleteButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View arg0) { public void onClick(View arg0) {
...@@ -398,7 +435,58 @@ public class PictogramActivity extends Activity implements iVocabularyListener, ...@@ -398,7 +435,58 @@ public class PictogramActivity extends Activity implements iVocabularyListener,
return false; return false;
} }
});*/ });
}
/**
* función para la selección de una foto del carrete
*/
public void chooseImage(){
Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType("image/*");
startActivityForResult(intent, SELECT_PICTURE);
}
/**
* Función para la selección de una foto del carrete
* @param requestCode
* @param resultCode
* @param data
*/
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == RESULT_OK) {
if (requestCode == SELECT_PICTURE) {
Uri selectedImageUri = data.getData();
selectedImagePath = getPath(selectedImageUri);
Log.d(LOG_TAG, "selectedImagePath:" + selectedImagePath);
// Ahora guardaría la imagen en la bbdd local y habría que subirla al server y sincronizar las bbdd
// ...
}
}
}
/**
* Función para la selección de una foto del carrete
* @param uri
* @return
*/
public String getPath(Uri uri) {
if( uri == null ) {
return null;
}
// this will only work for images selected from gallery
String[] projection = { MediaStore.Images.Media.DATA };
Cursor cursor = managedQuery(uri, projection, null, null, null);
if( cursor != null ){
int column_index = cursor
.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
cursor.moveToFirst();
return cursor.getString(column_index);
}
return uri.getPath();
} }
@Override @Override
......
...@@ -146,6 +146,7 @@ public class StudentFragmentGrid extends Fragment{ ...@@ -146,6 +146,7 @@ public class StudentFragmentGrid extends Fragment{
//Log.d(LOG_TAG, "Vocabulario de tam:" + vocabulary.size()); //Log.d(LOG_TAG, "Vocabulario de tam:" + vocabulary.size());
progressDialog.dismiss(); progressDialog.dismiss();
Intent pictogramActivity = new Intent(getActivity(), PictogramActivity.class); Intent pictogramActivity = new Intent(getActivity(), PictogramActivity.class);
pictogramActivity.putExtra("isSupervisor",true);
startActivity(pictogramActivity); startActivity(pictogramActivity);
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<fragment <fragment
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="600px" android:layout_height="400px"
class="com.yottacode.pictogram.gui.StudentFragmentGrid" class="com.yottacode.pictogram.gui.StudentFragmentGrid"
android:id="@+id/alumnos" android:id="@+id/alumnos"
android:layout_below="@+id/logintitle"/> android:layout_below="@+id/logintitle"/>
......
...@@ -13,41 +13,50 @@ ...@@ -13,41 +13,50 @@
<!-- android:keepScreenOn - To keep the screen bright as long as the app is visible (also forever) --> <!-- android:keepScreenOn - To keep the screen bright as long as the app is visible (also forever) -->
<GridView <GridView
android:id="@+id/tape_grid_view" android:id="@+id/tape_grid_view"
android:layout_width="850dp" android:layout_width="850dp"
android:layout_height="85dp" android:layout_height="85dp"
android:gravity="center" android:gravity="center"
android:numColumns="@integer/columns" android:numColumns="@integer/columns"
android:accessibilityLiveRegion="none" android:accessibilityLiveRegion="none"
android:background="@android:color/holo_red_light" android:background="@android:color/holo_red_light"
android:clickable="false" android:clickable="false"
android:layout_alignParentTop="true"> android:layout_alignParentTop="true">
</GridView> </GridView>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="850dp"
android:paddingTop="20dp"
android:src="@drawable/back64"
android:background="@null"
android:id="@+id/button_delete"
android:layout_alignParentTop="true"/>
<ImageButton <ImageButton
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingLeft="20dp" android:paddingLeft="20dp"
android:paddingTop="20dp" android:paddingTop="20dp"
android:src="@drawable/play64" android:src="@drawable/play64"
android:background="@null" android:background="@null"
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"/>
<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="100dp" android:columnWidth="100dp"
android:verticalSpacing="15dp" android:verticalSpacing="15dp"
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">
</GridView> </GridView>
</RelativeLayout> </RelativeLayout>
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:padding="2dp" android:padding="2dp"
android:numColumns="5" android:numColumns="5"
android:verticalSpacing="5dp" android:verticalSpacing="1dp"
android:horizontalSpacing="5dp" android:horizontalSpacing="5dp"
android:gravity="center" android:gravity="center"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
......
...@@ -12,5 +12,6 @@ ...@@ -12,5 +12,6 @@
android:id="@+id/txt" android:id="@+id/txt"
android:layout_width="140dp" android:layout_width="140dp"
android:layout_height="140dp" android:layout_height="140dp"
android:layout_centerHorizontal="true"
android:layout_below="@+id/img"/> android:layout_below="@+id/img"/>
</RelativeLayout> </RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<!-- Strings de serial -->
<string name="title_activity_serial">Access data</string>
<string name="action_entrar">Login</string> <string name="action_entrar">Login</string>
<string name="action_settings">Settings</string> <string name="action_settings">Settings</string>
<string name="app_name">Pictogram</string> <string name="app_name">Pictogram</string>
<string name="db_script_error">Fail updating the data base</string>
<string name="error_invalid_serial">These access data are not correct</string>
<string name="prompt_serial_mail">User</string> <string name="prompt_serial_mail">User</string>
<string name="prompt_serial_pass">Password</string> <string name="prompt_serial_pass">Password</string>
<string name="title_activity_login">Login</string> <string name="title_activity_login">Login</string>
<string name="title_activity_login_activity_fragment">Users login</string> <string name="title_activity_login_activity_fragment">Users login</string>
<string name="title_activity_login_activity_fragments">Users login</string> <string name="title_activity_login_activity_fragments">Users login</string>
<string name="title_activity_pictogram">PictogramActivity</string> <string name="title_activity_pictogram">PictogramActivity</string>
<string name="title_activity_serial">Write the access data</string>
<string name="title_activity_splash_screen">SplashScreenActivity</string> <string name="title_activity_splash_screen">SplashScreenActivity</string>
<string name="db_script_error">Fail updating the data base</string>
<string name="loginTitle">Who are you?</string> <string name="loginTitle">Who are you?</string>
<string name="toggle_turn_on">Supervisor mode off</string> <string name="passErrorTxt">Invalid password</string>
<string name="toggle_turn_off">Supervisor mode on</string> <string name="passErrorMsg">This password is not correct. Try again.</string>
<string name="userErrorTxt">User not found</string>
<string name="userErrorMsg">The user is not correct. Inténtelo de nuevo.</string>
<!-- Alert dialogs --> <!-- Alert dialogs -->
<string name="exitPictogram">Exit Pictogram</string> <string name="exitPictogram">Exit Pictogram</string>
...@@ -33,7 +35,6 @@ ...@@ -33,7 +35,6 @@
<string name="cancel">Cancel</string> <string name="cancel">Cancel</string>
<string name="tabletNoYotta">Important: writes this ID number for your cabinet</string> <string name="tabletNoYotta">Important: writes this ID number for your cabinet</string>
<string name="loginNoUsers">There are no students assigned with your tablet. Please, ask your cabinet</string> <string name="loginNoUsers">There are no students assigned with your tablet. Please, ask your cabinet</string>
<string name="serialRepeated"></string>
<!-- Login --> <!-- Login -->
<string name="systemMessage">System message</string> <string name="systemMessage">System message</string>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<string name="title_activity_login_activity_fragments">Entrada de usuarios</string> <string name="title_activity_login_activity_fragments">Entrada de usuarios</string>
<string name="title_activity_login_activity_fragment">Entrada de usuarios</string> <string name="title_activity_login_activity_fragment">Entrada de usuarios</string>
<string name="title_activity_pictogram">PictogramActivity</string> <string name="title_activity_pictogram">PictogramActivity</string>
<string name="db_script_error">Error al actualizar la base de datos</string>
<string name="title_activity_splash_screen">SplashScreenActivity</string> <string name="title_activity_splash_screen">SplashScreenActivity</string>
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
<string name="prompt_serial_mail">Usuario</string> <string name="prompt_serial_mail">Usuario</string>
<string name="prompt_serial_pass">Contraseña</string> <string name="prompt_serial_pass">Contraseña</string>
<string name="action_entrar">Entrar</string> <string name="action_entrar">Entrar</string>
<string name="error_invalid_serial">Este nº de serie no es correcto</string>
<string name="loginTitle">¿Quién eres?</string> <string name="loginTitle">¿Quién eres?</string>
<string name="toggle_turn_on">Desactivar modo supervisor</string> <string name="passErrorTxt">Invalid password</string>
<string name="toggle_turn_off">Activar modo supervisor</string> <string name="passErrorMsg">La contraseña indicada no es correcta. Inténtelo de nuevo.</string>
<string name="db_script_error">Error al actualizar la base de datos</string> <string name="userErrorTxt">User not found</string>
<string name="userErrorMsg">El usuario indicado no es correcto. Inténtelo de nuevo.</string>
<!-- Alert dialogs --> <!-- Alert dialogs -->
<string name="exitPictogram">Salir de Pictogram</string> <string name="exitPictogram">Salir de Pictogram</string>
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
<string name="cancel">Cancelar</string> <string name="cancel">Cancelar</string>
<string name="tabletNoYotta">Importante: anote este nº de dispositivo para indicárselo al responsable de su asociación o gabinete</string> <string name="tabletNoYotta">Importante: anote este nº de dispositivo para indicárselo al responsable de su asociación o gabinete</string>
<string name="loginNoUsers">No está asignado ningún alumno con tu tablet. Consulte con el responsable de su asociación o gabinete</string> <string name="loginNoUsers">No está asignado ningún alumno con tu tablet. Consulte con el responsable de su asociación o gabinete</string>
<string name="serialRepeated">Este tablet ya ha sido registrado previamente o el nº de serie no es correcto. Inténtelo de nuevo o consulte con nuestro servicio técnico</string>
<!-- Login --> <!-- Login -->
<string name="systemMessage">Mensaje del sistema</string> <string name="systemMessage">Mensaje del sistema</string>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<string name="title_activity_login_activity_fragments">Entrada de usuarios</string> <string name="title_activity_login_activity_fragments">Entrada de usuarios</string>
<string name="title_activity_login_activity_fragment">Entrada de usuarios</string> <string name="title_activity_login_activity_fragment">Entrada de usuarios</string>
<string name="title_activity_pictogram">PictogramActivity</string> <string name="title_activity_pictogram">PictogramActivity</string>
<string name="db_script_error">Error al actualizar la base de datos</string>
<string name="title_activity_splash_screen">SplashScreenActivity</string> <string name="title_activity_splash_screen">SplashScreenActivity</string>
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
<string name="prompt_serial_mail">Usuario</string> <string name="prompt_serial_mail">Usuario</string>
<string name="prompt_serial_pass">Contraseña</string> <string name="prompt_serial_pass">Contraseña</string>
<string name="action_entrar">Entrar</string> <string name="action_entrar">Entrar</string>
<string name="error_invalid_serial">Este nº de serie no es correcto</string>
<string name="loginTitle">¿Quién eres?</string> <string name="loginTitle">¿Quién eres?</string>
<string name="toggle_turn_on">Desactivar modo supervisor</string> <string name="passErrorTxt">Invalid password</string>
<string name="toggle_turn_off">Activar modo supervisor</string> <string name="passErrorMsg">La contraseña indicada no es correcta. Inténtelo de nuevo.</string>
<string name="db_script_error">Error al actualizar la base de datos</string> <string name="userErrorTxt">User not found</string>
<string name="userErrorMsg">El usuario indicado no es correcto. Inténtelo de nuevo.</string>
<!-- Alert dialogs --> <!-- Alert dialogs -->
<string name="exitPictogram">Salir de Pictogram</string> <string name="exitPictogram">Salir de Pictogram</string>
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
<string name="cancel">Cancelar</string> <string name="cancel">Cancelar</string>
<string name="tabletNoYotta">Importante: anote este nº de dispositivo para indicárselo al responsable de su asociación o gabinete</string> <string name="tabletNoYotta">Importante: anote este nº de dispositivo para indicárselo al responsable de su asociación o gabinete</string>
<string name="loginNoUsers">No está asignado ningún alumno con tu tablet. Consulte con el responsable de su asociación o gabinete</string> <string name="loginNoUsers">No está asignado ningún alumno con tu tablet. Consulte con el responsable de su asociación o gabinete</string>
<string name="serialRepeated">Este tablet ya ha sido registrado previamente o el nº de serie no es correcto. Inténtelo de nuevo o consulte con nuestro servicio técnico</string>
<!-- Login --> <!-- Login -->
<string name="systemMessage">Mensaje del sistema</string> <string name="systemMessage">Mensaje del sistema</string>
......
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