Commit 9d03b84a by Fernando Martínez Santiago

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

parents 0df555c0 d2c1a88e
...@@ -55,7 +55,7 @@ public class EditPictoActivity extends Activity { ...@@ -55,7 +55,7 @@ public class EditPictoActivity extends Activity {
Bitmap imagePicto = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length); Bitmap imagePicto = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length);
cropImageView.setImageBitmap(imagePicto); cropImageView.setImageBitmap(imagePicto);
/* byteArray = getIntent().getByteArrayExtra("imageBackground"); /*byteArray = getIntent().getByteArrayExtra("imageBackground");
Bitmap imageBackground = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length); Bitmap imageBackground = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length);
backgroundImage.setImageBitmap(imageBackground);*/ backgroundImage.setImageBitmap(imageBackground);*/
......
...@@ -62,6 +62,9 @@ import org.json.JSONException; ...@@ -62,6 +62,9 @@ import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Iterator; import java.util.Iterator;
...@@ -73,6 +76,7 @@ import java.util.concurrent.TimeUnit; ...@@ -73,6 +76,7 @@ import java.util.concurrent.TimeUnit;
public class PictogramActivity extends Activity implements VocabularyTalk.iVocabularyListener { public class PictogramActivity extends Activity implements VocabularyTalk.iVocabularyListener {
private Picto picto = null;
private static final int CAMERA_PIC_REQUEST = 1; private static final int CAMERA_PIC_REQUEST = 1;
private static final int GALLERY_PIC_REQUEST = 2; private static final int GALLERY_PIC_REQUEST = 2;
// Main layout for this activity // Main layout for this activity
...@@ -683,6 +687,14 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab ...@@ -683,6 +687,14 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
} }
} }
public Picto getPicto() {
return picto;
}
public void setPicto(Picto picto) {
this.picto = picto;
}
/* ********************************************************************************************* /* *********************************************************************************************
* Event listener classes * Event listener classes
* ********************************************************************************************/ * ********************************************************************************************/
...@@ -824,7 +836,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab ...@@ -824,7 +836,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
*/ */
private class OnPictoLongClickListener implements AdapterView.OnItemLongClickListener { private class OnPictoLongClickListener implements AdapterView.OnItemLongClickListener {
public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) { public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
Log.i(LOG_TAG, "Click largo");
if (PCBcontext.getPcbdb().getCurrentUser().is_supervisor()) { if (PCBcontext.getPcbdb().getCurrentUser().is_supervisor()) {
// Si es supervisor al hacer longClick deshabilito ese pictograma o lo habilito // Si es supervisor al hacer longClick deshabilito ese pictograma o lo habilito
Picto p = getCurrentPictoGridAdapter().getItem(position); Picto p = getCurrentPictoGridAdapter().getItem(position);
...@@ -1126,17 +1137,9 @@ protected void showOnlyTape(boolean onlyTape) { ...@@ -1126,17 +1137,9 @@ protected void showOnlyTape(boolean onlyTape) {
/**Para cambiar la activity de PictogramActivity a EditPictoActivity /**Para cambiar la activity de PictogramActivity a EditPictoActivity
* *
* @param textLegend
* @param image * @param image
*/ */
public void launchActivity(String textLegend, Bitmap image){ public void launchActivity(Bitmap image){
//Para hacer el pantallazo
/*View v1 = getWindow().getDecorView().getRootView();
v1.setDrawingCacheEnabled(true);
Bitmap bitmap = Bitmap.createBitmap(v1.getDrawingCache());
v1.setDrawingCacheEnabled(false);*/
Intent intent = new Intent(this, EditPictoActivity.class); Intent intent = new Intent(this, EditPictoActivity.class);
if(image!=null) { if(image!=null) {
......
...@@ -56,7 +56,6 @@ ...@@ -56,7 +56,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:scaleType="centerInside" android:scaleType="centerInside"
app:srcCompat="@drawable/descarga"
android:layout_marginLeft="5dp" android:layout_marginLeft="5dp"
android:maxWidth="650px" android:maxWidth="650px"
android:maxHeight="250px" android:maxHeight="250px"
......
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