Commit 73e441be by Fernando Martínez Santiago

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

parents 7c78dce0 912c4f69
Showing with 384 additions and 142 deletions
...@@ -62,7 +62,7 @@ public class RestapiWrapper { ...@@ -62,7 +62,7 @@ public class RestapiWrapper {
ask(operation, params, postOrGet, false, listener); ask(operation, params, postOrGet, false, listener);
} }
public void ask(String operation, Hashtable<String, String> params, String postOrGet, boolean json, iRestapiListener listener) { public void ask(String operation, Hashtable<String, String> params, String postOrGet, boolean json, iRestapiListener listener) {
Log.i(this.getClass().getCanonicalName(),"Asking for "+operation);
// call preExecute listener to show loading window // call preExecute listener to show loading window
listener.preExecute(); listener.preExecute();
// call AsynTask to perform network operation on separate thread // call AsynTask to perform network operation on separate thread
...@@ -130,16 +130,17 @@ public class RestapiWrapper { ...@@ -130,16 +130,17 @@ public class RestapiWrapper {
private static JSONObject resultToJSON(HttpURLConnection urlConnection) throws IOException { private static JSONObject resultToJSON(HttpURLConnection urlConnection) throws IOException {
int responseCode=urlConnection.getResponseCode(); int responseCode=urlConnection.getResponseCode();
String response=""; StringBuilder response=new StringBuilder("");
String line; String line;
JSONObject JSONresponse; JSONObject JSONresponse;
BufferedReader br = new BufferedReader(new InputStreamReader(responseCode == HttpsURLConnection.HTTP_OK BufferedReader br = new BufferedReader(new InputStreamReader(responseCode == HttpsURLConnection.HTTP_OK
? urlConnection.getInputStream() ? urlConnection.getInputStream()
: urlConnection.getErrorStream())); : urlConnection.getErrorStream()));
// Log.i(com.yottacode.net.RestapiWrapper.class.getName(), "starting to read server answer for"+urlConnection.getURL().toString());
while ((line=br.readLine()) != null) { while ((line=br.readLine()) != null) {
response+=line; response.append(line);
} }
if (response.length()==0) response="{\"result\":null}"; if (response.length()==0) response.append("{\"result\":null}");
try { try {
JSONresponse = new JSONObject("{ "+SERVER_RESULT+": " + response + (responseCode == HttpsURLConnection.HTTP_OK JSONresponse = new JSONObject("{ "+SERVER_RESULT+": " + response + (responseCode == HttpsURLConnection.HTTP_OK
...@@ -149,7 +150,7 @@ public class RestapiWrapper { ...@@ -149,7 +150,7 @@ public class RestapiWrapper {
JSONresponse = null; JSONresponse = null;
Log.e(RestapiWrapper.class.getCanonicalName(),e.getMessage()); Log.e(RestapiWrapper.class.getCanonicalName(),e.getMessage());
} }
Log.i(com.yottacode.net.RestapiWrapper.class.getName(), "server answer: " + JSONresponse.toString()); // Log.i(com.yottacode.net.RestapiWrapper.class.getName(), "server answer: " + JSONresponse.toString());
return JSONresponse; return JSONresponse;
} }
...@@ -236,7 +237,7 @@ public class RestapiWrapper { ...@@ -236,7 +237,7 @@ public class RestapiWrapper {
@Override @Override
protected HttpAsyncTaskParams doInBackground(HttpAsyncTaskParams... params) { protected HttpAsyncTaskParams doInBackground(HttpAsyncTaskParams... params) {
try { try {
Log.i(com.yottacode.net.RestapiWrapper.class.getName(), " asking to the server for " + params[0].url+" params:"+params[0].url_params +" JSON?"+params[0].json_params); Log.i(com.yottacode.net.RestapiWrapper.class.getName(), " Asking to the server for " + params[0].url+" params:"+params[0].url_params +" JSON?"+params[0].json_params);
JSONObject jresult = params[0].request_method.equalsIgnoreCase("GET") JSONObject jresult = params[0].request_method.equalsIgnoreCase("GET")
? GET(params[0].url, params[0].url_params) ? GET(params[0].url, params[0].url_params)
: POST(params[0].url, params[0].request_method, params[0].url_params, params[0].json_params); : POST(params[0].url, params[0].request_method, params[0].url_params, params[0].json_params);
......
package com.yottacode.pictogram.dao; package com.yottacode.pictogram.dao;
import android.graphics.Bitmap; import android.animation.ValueAnimator;
import android.graphics.Color; import android.graphics.Color;
import android.util.Log; import android.util.Log;
...@@ -21,11 +21,7 @@ import org.json.JSONObject; ...@@ -21,11 +21,7 @@ import org.json.JSONObject;
* @version 1.0 * @version 1.0
*/ */
public class Picto extends Img { public class Picto extends Img {
int cont = 0;
Bitmap bitmap;
// String constant for logs
private final String LOG_TAG = this.getClass().getSimpleName(); // Or .getCanonicalName()
public final static class JSON_ATTTRS { public final static class JSON_ATTTRS {
public static String CATEGORY = "id_cat"; public static String CATEGORY = "id_cat";
...@@ -64,12 +60,31 @@ public class Picto extends Img { ...@@ -64,12 +60,31 @@ public class Picto extends Img {
private String translation; private String translation;
private boolean is_mirror=false; private boolean is_mirror=false;
private boolean highlight_background=false; private boolean highlight_background=false;
ValueAnimator.AnimatorListener lighten=null;
public boolean is_mirror() {return is_mirror;} public boolean is_mirror() {return is_mirror;}
public ValueAnimator.AnimatorListener lighten() {
return lighten;
}
public boolean is_highlight_background() {return highlight_background;} public boolean is_highlight_background() {return highlight_background;}
public void set_mirror(boolean is_mirror, boolean highlight_background) { public void set_mirror(boolean is_mirror, boolean highlight_background) {
this.highlight_background =highlight_background; this.highlight_background =highlight_background;
this.is_mirror=is_mirror;} this.is_mirror=is_mirror;}
public void set_ligthen(ValueAnimator.AnimatorListener lighten) {
this.lighten = lighten;
}
public Picto(Picto p) {
super(p);
try {
this.attributes=new JSONObject(p.attributes.toString());
} catch (JSONException e) {
Log.e(this.getClass().getCanonicalName(),e.getMessage());
}
translation=new String(p.get_translation());
}
public Picto(int id, String url, String translation, int cat, int row, int column, int freeRow, int freeColumn) throws JSONException { public Picto(int id, String url, String translation, int cat, int row, int column, int freeRow, int freeColumn) throws JSONException {
this(id, url, translation, new JSONObject() this(id, url, translation, new JSONObject()
.put(JSON_ATTTRS.CATEGORY, cat) .put(JSON_ATTTRS.CATEGORY, cat)
......
...@@ -9,6 +9,7 @@ import com.yottacode.pictogram.tools.PCBcontext; ...@@ -9,6 +9,7 @@ import com.yottacode.pictogram.tools.PCBcontext;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
import java.util.Iterator;
import java.util.Vector; import java.util.Vector;
/** /**
...@@ -69,9 +70,11 @@ public class ActionTalk implements Emitter.Listener { ...@@ -69,9 +70,11 @@ public class ActionTalk implements Emitter.Listener {
public void addListener(iActionListener listener) { public void addListener(iActionListener listener) {
listeners.add(listener); listeners.add(listener);
} }
public void removeListener(iActionListener removedlistener) { public void removeListener(iActionListener removedlistener) {
for (iActionListener listener:this.listeners ) Iterator listeners=this.listeners.iterator();
if (listener==removedlistener) listeners.remove(removedlistener); while (listeners.hasNext() )
if (listeners.next()==removedlistener) listeners.remove();
} }
/** /**
......
...@@ -57,6 +57,18 @@ public class Img { ...@@ -57,6 +57,18 @@ public class Img {
this.type=type; this.type=type;
this.bitmap=null; this.bitmap=null;
} }
public Img(Img i) {
this.id = i.id;
this.url = new String(i.url);
this.type=new String(i.type);
try {
if (PCBcontext.getContext()!=null && i.get_bitmap(PCBcontext.getContext())!=null)
this.bitmap=i.get_bitmap(PCBcontext.getContext()).copy(i.get_bitmap(PCBcontext.getContext()).getConfig(),true);
} catch (IOException e) {
Log.e(this.getClass().getCanonicalName(),e.getMessage());
}
}
public String file_name() { return this.id+"."+Img.FILETYPE; } public String file_name() { return this.id+"."+Img.FILETYPE; }
public int get_id() { return this.id;} public int get_id() { return this.id;}
......
...@@ -43,13 +43,6 @@ ...@@ -43,13 +43,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/CIFlavorDebug/jni" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/CIFlavorDebug/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/CIFlavorDebug/rs" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/CIFlavorDebug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/CIFlavorDebug/shaders" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/CIFlavorDebug/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/CIFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/CIFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/CIFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/CIFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/CIFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/CIFlavor/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/CIFlavor/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavorDebug/res" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/testCIFlavorDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavorDebug/resources" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/testCIFlavorDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavorDebug/assets" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/testCIFlavorDebug/assets" type="java-test-resource" />
...@@ -58,6 +51,13 @@ ...@@ -58,6 +51,13 @@
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavorDebug/jni" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/testCIFlavorDebug/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavorDebug/rs" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/testCIFlavorDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavorDebug/shaders" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/testCIFlavorDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/CIFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/CIFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/CIFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/CIFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/CIFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/CIFlavor/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/CIFlavor/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/CIFlavor/res" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/CIFlavor/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/CIFlavor/resources" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/CIFlavor/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/CIFlavor/assets" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/CIFlavor/assets" type="java-resource" />
...@@ -66,14 +66,6 @@ ...@@ -66,14 +66,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/CIFlavor/jni" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/CIFlavor/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/CIFlavor/rs" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/CIFlavor/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/CIFlavor/shaders" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/CIFlavor/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavor/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavor/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavor/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavor/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavor/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavor/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavor/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavor/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestCIFlavor/res" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestCIFlavor/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestCIFlavor/resources" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestCIFlavor/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestCIFlavor/assets" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestCIFlavor/assets" type="java-test-resource" />
...@@ -82,6 +74,14 @@ ...@@ -82,6 +74,14 @@
<sourceFolder url="file://$MODULE_DIR$/src/androidTestCIFlavor/jni" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestCIFlavor/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestCIFlavor/rs" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestCIFlavor/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestCIFlavor/shaders" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestCIFlavor/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavor/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavor/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavor/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavor/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavor/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavor/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavor/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testCIFlavor/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
...@@ -124,7 +124,6 @@ ...@@ -124,7 +124,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/24.2.1/jars" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/24.2.1/jars" />
...@@ -145,6 +144,7 @@ ...@@ -145,6 +144,7 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-support" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-support" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/restart-dex" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/restart-dex" />
......
package com.yottacode.pictogram.tabletlibrary.gui; package com.yottacode.pictogram.tabletlibrary.gui;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.content.Context; import android.content.Context;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.Canvas; import android.graphics.Canvas;
import android.graphics.Color; import android.graphics.Color;
import android.graphics.Paint; import android.graphics.Paint;
import android.graphics.PorterDuff; import android.graphics.PorterDuff;
import android.util.Log; import android.support.v4.content.ContextCompat;
import android.util.TypedValue; import android.util.TypedValue;
import android.view.Gravity; import android.view.Gravity;
import android.view.LayoutInflater; import android.view.LayoutInflater;
...@@ -32,6 +34,7 @@ public class PictoItemViewGenerator { ...@@ -32,6 +34,7 @@ public class PictoItemViewGenerator {
public static final int LAYOUT_BIG = R.layout.picto_grid_item_big; public static final int LAYOUT_BIG = R.layout.picto_grid_item_big;
public static int mirror_color=0; public static int mirror_color=0;
/** /**
* *
* @param picto Pictogram to set the legend text * @param picto Pictogram to set the legend text
...@@ -236,6 +239,9 @@ public class PictoItemViewGenerator { ...@@ -236,6 +239,9 @@ public class PictoItemViewGenerator {
pictoImage.setScaleY(scale[mirror_color%scale.length]); pictoImage.setScaleY(scale[mirror_color%scale.length]);
if (picto.is_highlight_background()) layout.setBackgroundColor(color[mirror_color%color.length]); if (picto.is_highlight_background()) layout.setBackgroundColor(color[mirror_color%color.length]);
} }
if (picto.lighten()!=null)
animateImageView(pictoImage,picto.lighten());
} }
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
...@@ -244,4 +250,37 @@ public class PictoItemViewGenerator { ...@@ -244,4 +250,37 @@ public class PictoItemViewGenerator {
return convertView; return convertView;
} }
public static void animateImageView(final ImageView v,ValueAnimator.AnimatorListener listener) {
final int orange = ContextCompat.getColor(PCBcontext.getContext(),R.color.picto_default_background);
final ValueAnimator colorAnim = ObjectAnimator.ofFloat(0f, 1f);
colorAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
float mul = (Float) animation.getAnimatedValue();
int alphaOrange = adjustAlpha(orange, mul);
v.setColorFilter(alphaOrange, PorterDuff.Mode.SRC_ATOP);
if (mul == 0.0) {
v.setColorFilter(0);
}
}
});
colorAnim.addListener(listener);
colorAnim.setDuration(1500);
colorAnim.start();
}
public static int adjustAlpha(int color, float factor) {
int alpha = Math.round(Color.alpha(color) * factor);
int red = Color.red(color);
int green = Color.green(color);
int blue = Color.blue(color);
return Color.argb(alpha, red, green, blue);
}
} }
...@@ -21,7 +21,6 @@ import com.yottacode.pictogram.dao.User; ...@@ -21,7 +21,6 @@ import com.yottacode.pictogram.dao.User;
import com.yottacode.pictogram.dao.UserLogin; import com.yottacode.pictogram.dao.UserLogin;
import com.yottacode.pictogram.tabletlibrary.R; import com.yottacode.pictogram.tabletlibrary.R;
import com.yottacode.pictogram.tabletlibrary.net.NetServiceTablet; import com.yottacode.pictogram.tabletlibrary.net.NetServiceTablet;
import com.yottacode.pictogram.tools.Img;
import com.yottacode.pictogram.tools.PCBcontext; import com.yottacode.pictogram.tools.PCBcontext;
import org.json.JSONException; import org.json.JSONException;
......
...@@ -18,7 +18,6 @@ import com.yottacode.net.iRestapiListener; ...@@ -18,7 +18,6 @@ import com.yottacode.net.iRestapiListener;
import com.yottacode.pictogram.dao.User; import com.yottacode.pictogram.dao.User;
import com.yottacode.pictogram.net.ImgDownloader; import com.yottacode.pictogram.net.ImgDownloader;
import com.yottacode.pictogram.tabletlibrary.R; import com.yottacode.pictogram.tabletlibrary.R;
import com.yottacode.pictogram.tabletlibrary.gui.session.SessionActivity;
import com.yottacode.pictogram.tools.Img; import com.yottacode.pictogram.tools.Img;
import com.yottacode.pictogram.tools.PCBcontext; import com.yottacode.pictogram.tools.PCBcontext;
import com.yottacode.tools.GUITools; import com.yottacode.tools.GUITools;
...@@ -117,10 +116,8 @@ public class StudentFragmentGrid extends Fragment{ ...@@ -117,10 +116,8 @@ public class StudentFragmentGrid extends Fragment{
@Override @Override
public void loadComplete() { public void loadComplete() {
if (progressDialog!=null && progressDialog.isShowing()) progressDialog.dismiss(); if (progressDialog!=null && progressDialog.isShowing()) progressDialog.dismiss();
Intent sessionActivity = new Intent(getActivity(), SessionActivity.class); Intent pictogramActivity = new Intent(getActivity(), PictogramActivity.class);
startActivity(sessionActivity); startActivity(pictogramActivity);
//Intent pictogramActivity = new Intent(getActivity(), PictogramActivity.class);
//startActivity(pictogramActivity);
} }
@Override @Override
......
...@@ -52,6 +52,7 @@ public class TapeAdapter extends BaseAdapter { ...@@ -52,6 +52,7 @@ public class TapeAdapter extends BaseAdapter {
pictoLinkedList.remove(position); pictoLinkedList.remove(position);
} }
// ELIMINAR el último ITEM DEL ADAPTADOR // ELIMINAR el último ITEM DEL ADAPTADOR
public void deleteLastView(){ public void deleteLastView(){
// Controlar excepcion al intentar eliminar el último cuando no hay elementos // Controlar excepcion al intentar eliminar el último cuando no hay elementos
...@@ -96,10 +97,11 @@ public class TapeAdapter extends BaseAdapter { ...@@ -96,10 +97,11 @@ public class TapeAdapter extends BaseAdapter {
@Override @Override
public View getView(int position, View convertView, ViewGroup parent){ public View getView(int position, View convertView, ViewGroup parent){
return PictoItemViewGenerator.getPictoView( View pictoView = PictoItemViewGenerator.getPictoView(
this.pictoLinkedList.get(position), this.pictoLinkedList.get(position),
convertView, convertView,
parent,true); parent, true);
return pictoView;
} }
@TargetApi(Build.VERSION_CODES.LOLLIPOP) @TargetApi(Build.VERSION_CODES.LOLLIPOP)
......
package com.yottacode.pictogram.tabletlibrary.gui.session; package com.yottacode.pictogram.tabletlibrary.gui.session;
import android.content.Context; import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.BaseAdapter; import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.yottacode.pictogram.dao.Picto;
import com.yottacode.pictogram.tabletlibrary.R; import com.yottacode.pictogram.tabletlibrary.R;
import com.yottacode.tools.BitmapTools;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Vector; import java.util.Vector;
/** /**
* Created by Fernando on 18/12/2016. * Created by Fernando on 18/12/2016.
*/ */
class PictoAdapter extends BaseAdapter { class PictoAdapter extends BaseAdapter {
private class Item { public void setCurrentMsg(int currentMsg) {
Picto picto; this.currentMsg = currentMsg;
int secs; }
public static class Item {
Bitmap img;
String secs;
public Item(Bitmap img, String secs) {
this.img=img;
this.secs=secs;
}
Bitmap getImg() {
return img;
}
String getTime() {
return secs;
}
public void setImg(Bitmap currmsg) {
this.img=currmsg;
}
} }
Context context; Context context;
Vector<Item> msg; Vector<Item> msg;
int currentMsg=0;
final long base_time=new Date().getTime();
private static LayoutInflater inflater = null; private static LayoutInflater inflater = null;
public PictoAdapter(Context context) { public PictoAdapter(Context context) {
this.context = context; this.context = context;
msg=new Vector<>(3); msg=new Vector<>(3);
newMsg();
inflater = (LayoutInflater) context inflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE); .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
} }
private String getTimeDiff(long time) {
long mills = time - this.base_time;
int mins = (int) (mills / (1000*60));
int secs = (int)(mills/(1000)) - mins*60;
return "+"+mins+ "' " + secs+"''";
}
@Override @Override
public int getCount() { public int getCount() {
return msg.size(); return msg.size();
} }
@Override @Override
public Object getItem(int position) { public Item getItem(int position) {
return msg.get(position); return msg.get(position);
} }
...@@ -49,11 +93,106 @@ public long getItemId(int position) { ...@@ -49,11 +93,106 @@ public long getItemId(int position) {
} }
@Override @Override
public View getView(int position, View convertView, ViewGroup parent) { public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
View vi = convertView; View vi = convertView;
if (vi == null) if (vi == null)
vi = inflater.inflate(R.layout.session_picto_view, null); vi = inflater.inflate(R.layout.session_picto_view, null);
return vi; ImageView picto=(ImageView)vi.findViewById(R.id.session_picto);
picto.setImageBitmap(this.msg.get(position).getImg());
if (currentMsg== position)
vi.setBackgroundColor(Color.LTGRAY);
else
vi.setBackgroundColor(Color.TRANSPARENT);
return vi;
}
public void addItem(Bitmap bmp) {
Item item=this.msg.get(currentMsg);
Bitmap oldmsg=item.getImg();
// bmp=new BitmapTools(bmp).resize(85,85).get();
bmp=set_text(context,bmp,getTimeDiff(new Date().getTime()));
Bitmap currmsg=combineImages(oldmsg,bmp);
item.setImg(currmsg);
} }
public void newMsg() {
Bitmap bmp=BitmapFactory.decodeResource(context.getResources(),
R.drawable.session_starttry);
bmp=new BitmapTools(bmp).resize(75,75).get();
Calendar calendar = GregorianCalendar.getInstance(); // creates a new calendar instance
calendar.setTime(new Date()); // assigns calendar to given date
String time= calendar.get(Calendar.HOUR)+":"+calendar.get(Calendar.MINUTE)+":"+calendar.get(Calendar.SECOND);
bmp=set_text(context,bmp,time);
if (this.currentMsg==this.msg.size()-1 || this.msg.size()==0) {
this.currentMsg = this.msg.size();
msg.add(new Item(bmp, time));
}
else {
this.currentMsg = this.msg.size() - 1;
notifyDataSetChanged();
}
}
private Bitmap combineImages(Bitmap c, Bitmap s) { // can add a 3rd parameter 'String loc' if you want to save the new image - left some code to do that at the bottom
Bitmap cs = null;
int width, height = 0;
if(c.getWidth() > s.getWidth()) {
width = c.getWidth() + s.getWidth();
height = c.getHeight();
} else {
width = s.getWidth() + s.getWidth();
height = c.getHeight();
}
cs = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
Canvas comboImage = new Canvas(cs);
comboImage.drawBitmap(c, 0f, 0f, null);
comboImage.drawBitmap(s, c.getWidth(), 0f, null);
return cs;
}
static Bitmap set_text(Context context,Bitmap bitmap,String texto) {
Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
int width = bitmap.getWidth(); //Ancho original
int height = bitmap.getHeight(); //Alto original
android.graphics.Bitmap.Config bitmapConfig = bitmap.getConfig();
if (bitmapConfig == null) {
bitmapConfig = android.graphics.Bitmap.Config.ARGB_8888;
}
bitmap = bitmap.copy(bitmapConfig, true);
Canvas canvas = new Canvas(bitmap);
Bitmap bm = Bitmap.createScaledBitmap(bitmap, (int)Math.round(0.9*width), (int)Math.round(0.9*height), false);
canvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR); //Poner en blanco el bitmap original para dibujar encima
canvas.drawBitmap(bm, 0, 0, paint);
TextView textView = new TextView(context);
textView.layout(0, 50, 100, 100);
textView.setPadding(0, 0, 0, 0);
textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, 13);
textView.setTextColor(Color.BLACK);
textView.setBackgroundColor(Color.TRANSPARENT);
textView.setWidth(100);
textView.setGravity(Gravity.CENTER_HORIZONTAL);
textView.setMaxLines(1);
textView.setText(texto);
textView.setDrawingCacheEnabled(true);
canvas.drawBitmap(textView.getDrawingCache(), 0, 60, null);
return bitmap;
}
} }
...@@ -2,6 +2,7 @@ package com.yottacode.pictogram.tabletlibrary.gui.session; ...@@ -2,6 +2,7 @@ package com.yottacode.pictogram.tabletlibrary.gui.session;
import android.app.Activity; import android.app.Activity;
import android.content.Context; import android.content.Context;
import android.graphics.Bitmap;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
...@@ -9,16 +10,19 @@ import android.util.Log; ...@@ -9,16 +10,19 @@ import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ListView; import android.widget.ListView;
import com.yottacode.pictogram.net.websockets.ActionTalk; import com.yottacode.pictogram.net.websockets.ActionTalk;
import com.yottacode.pictogram.tabletlibrary.R; import com.yottacode.pictogram.tabletlibrary.R;
import com.yottacode.pictogram.tools.PCBcontext; import com.yottacode.pictogram.tools.PCBcontext;
import java.io.IOException;
/** /**
* A simple {@link Fragment} subclass. * A simple {@link Fragment} subclass.
* Activities that contain this fragment must implement the * Activities that contain this fragment must implement the
* {@link SessionFragment.OnFragmentInteractionListener} interface * {@link SessionFragment.OnSessionListener } interface
* to handle interaction events. * to handle interaction events.
* Use the {@link SessionFragment#newInstance} factory method to * Use the {@link SessionFragment#newInstance} factory method to
* create an instance of this fragment. * create an instance of this fragment.
...@@ -33,9 +37,10 @@ public class SessionFragment extends Fragment implements ActionTalk.iActionListe ...@@ -33,9 +37,10 @@ public class SessionFragment extends Fragment implements ActionTalk.iActionListe
private String mParam1; private String mParam1;
private String mParam2; private String mParam2;
ListView list_pictomsgs; ListView list_pictomsg;
PictoAdapter adapter_pictomsg;
private OnFragmentInteractionListener mListener; private OnSessionListener mListener=null;
public SessionFragment() { public SessionFragment() {
// Required empty public constructor // Required empty public constructor
...@@ -73,24 +78,28 @@ public class SessionFragment extends Fragment implements ActionTalk.iActionListe ...@@ -73,24 +78,28 @@ public class SessionFragment extends Fragment implements ActionTalk.iActionListe
Bundle savedInstanceState) { Bundle savedInstanceState) {
// Inflate the layout for this fragment // Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_session, container, false); View view = inflater.inflate(R.layout.fragment_session, container, false);
list_pictomsgs = (ListView) this.getActivity().findViewById(R.id.session_pictomsg_list); list_pictomsg = (ListView) view.findViewById(R.id.session_pictomsg_list);
// list_pictomsgs.setAdapter(new PictoAdapter(this.getContext())); adapter_pictomsg=new PictoAdapter(this.getContext());
list_pictomsg.setAdapter(adapter_pictomsg);
list_pictomsg.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
((PictoAdapter)list_pictomsg.getAdapter()).setCurrentMsg(position);
((PictoAdapter)list_pictomsg.getAdapter()).notifyDataSetChanged();
}
});
return view; return view;
} }
// TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
}
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
@Override @Override
public void onAttach(Activity context) { public void onAttach(Activity context) {
super.onAttach(context); super.onAttach(context);
if (context instanceof OnFragmentInteractionListener) { if ( mListener==null)
mListener = (OnFragmentInteractionListener) context; if (context instanceof OnSessionListener) {
mListener = (OnSessionListener ) context;
PCBcontext.getVocabulary().addActionTalkListener(this); PCBcontext.getVocabulary().addActionTalkListener(this);
} else { } else {
throw new RuntimeException(context.toString() throw new RuntimeException(context.toString()
...@@ -101,8 +110,9 @@ public class SessionFragment extends Fragment implements ActionTalk.iActionListe ...@@ -101,8 +110,9 @@ public class SessionFragment extends Fragment implements ActionTalk.iActionListe
@Override @Override
public void onAttach(Context context) { public void onAttach(Context context) {
super.onAttach(context); super.onAttach(context);
if (context instanceof OnFragmentInteractionListener) { if ( mListener==null)
mListener = (OnFragmentInteractionListener) context; if (context instanceof OnSessionListener ) {
mListener = (OnSessionListener ) context;
PCBcontext.getVocabulary().addActionTalkListener(this); PCBcontext.getVocabulary().addActionTalkListener(this);
} else { } else {
throw new RuntimeException(context.toString() throw new RuntimeException(context.toString()
...@@ -120,6 +130,27 @@ public class SessionFragment extends Fragment implements ActionTalk.iActionListe ...@@ -120,6 +130,27 @@ public class SessionFragment extends Fragment implements ActionTalk.iActionListe
@Override @Override
public void action(action action, int picto_cat, int picto_id) { public void action(action action, int picto_cat, int picto_id) {
Log.e(this.getClass().getCanonicalName(),"ACTION VOC"); Log.e(this.getClass().getCanonicalName(),"ACTION VOC");
try {
Bitmap bmp=PCBcontext.getVocabulary().get_picto(picto_cat,picto_id).get_bitmap(getContext());
this.adapter_pictomsg.addItem(bmp);
getActivity().runOnUiThread(new Runnable() {
public void run() {
adapter_pictomsg.notifyDataSetChanged();
}});
} catch (IOException e) {
e.printStackTrace();
}
}
public void newMsg(Bitmap bmp) {
Log.e(this.getClass().getCanonicalName(),"ACTION VOC");
this.adapter_pictomsg.addItem(bmp);
this.adapter_pictomsg.newMsg();
getActivity().runOnUiThread(new Runnable() {
public void run() {
adapter_pictomsg.notifyDataSetChanged();
}});
} }
/** /**
...@@ -132,8 +163,8 @@ public class SessionFragment extends Fragment implements ActionTalk.iActionListe ...@@ -132,8 +163,8 @@ public class SessionFragment extends Fragment implements ActionTalk.iActionListe
* "http://developer.android.com/training/basics/fragments/communicating.html" * "http://developer.android.com/training/basics/fragments/communicating.html"
* >Communicating with Other Fragments</a> for more information. * >Communicating with Other Fragments</a> for more information.
*/ */
public interface OnFragmentInteractionListener { public interface OnSessionListener {
// TODO: Update argument type and name // TODO: Update argument type and name
void onFragmentInteraction(Uri uri); void onSessionInteraction(Uri uri);
} }
} }
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
android:background="#BDBDBD" android:background="#BDBDBD"
android:keepScreenOn="true" android:keepScreenOn="true"
android:id="@+id/pictogramLayout" android:id="@+id/pictogramLayout"
android:activityOpenEnterAnimation="@anim/slide_in"
android:activityOpenExitAnimation="@anim/slide_out"
tools:context="com.yottacode.pictogram.tabletlibrary.gui.PictogramActivity" tools:context="com.yottacode.pictogram.tabletlibrary.gui.PictogramActivity"
android:padding="@dimen/small_padding"> android:padding="@dimen/small_padding">
<!-- 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) -->
......
...@@ -51,13 +51,14 @@ ...@@ -51,13 +51,14 @@
<Button <Button
android:id="@+id/entrar_button" style="?android:textAppearanceSmall" android:id="@+id/entrar_button" style="?android:textAppearanceSmall"
android:layout_width="400px" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="11dp" android:layout_marginTop="11dp"
android:text="@string/action_entrar" android:text="@string/action_entrar"
android:textStyle="bold" android:textStyle="bold"
android:layout_below="@+id/serialpass" android:layout_below="@+id/serialpass"
android:layout_alignStart="@+id/serialpass" /> android:layout_alignStart="@+id/serialpass"
android:layout_alignParentEnd="true" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -68,12 +69,13 @@ ...@@ -68,12 +69,13 @@
android:layout_marginEnd="18dp" /> android:layout_marginEnd="18dp" />
<LinearLayout <LinearLayout
android:layout_below="@+id/entrar_button"
android:orientation="vertical" android:orientation="vertical"
android:layout_height="350px" android:layout_height="wrap_content"
android:layout_marginStart="67dp" android:layout_marginStart="67dp"
android:layout_marginTop="20dp"
android:background="@color/common_plus_signin_btn_text_dark_pressed" android:background="@color/common_plus_signin_btn_text_dark_pressed"
android:layout_width="400px" android:layout_width="200dp"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:id="@+id/stuLay"> android:id="@+id/stuLay">
...@@ -99,12 +101,14 @@ ...@@ -99,12 +101,14 @@
<LinearLayout <LinearLayout
android:orientation="vertical" android:orientation="vertical"
android:background="@color/common_google_signin_btn_text_dark_default" android:background="@color/common_google_signin_btn_text_dark_default"
android:layout_height="350px" android:layout_height="wrap_content"
android:layout_width="400px" android:layout_width="200dp"
android:layout_alignParentBottom="true" android:layout_marginStart="10dp"
android:layout_alignStart="@+id/entrar_button" android:layout_alignTop="@id/stuLay"
android:layout_marginStart="270dp" android:layout_toEndOf="@id/stuLay"
android:id="@+id/supLay">
android:id="@+id/supLay"
android:gravity="right">
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
android:id="@+id/sessionFragmentLayout" android:id="@+id/sessionFragmentLayout"
android:layout_below="@+id/view" android:layout_below="@+id/view"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_height="328dp"> android:layout_height="300dp">
<FrameLayout <FrameLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
......
...@@ -3,20 +3,14 @@ ...@@ -3,20 +3,14 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context="com.yottacode.pictogram.tabletlibrary.gui.session.SessionFragment" tools:context="com.yottacode.pictogram.tabletlibrary.gui.session.SessionFragment"
android:orientation="vertical"> android:orientation="vertical" >
<ListView
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/session_pictomsg_list"
android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="220dp" android:layout_height="wrap_content"
android:orientation="horizontal" > android:layout_gravity="left|start">
</ListView>
<ListView
android:id="@+id/session_pictomsg_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>
</LinearLayout> </LinearLayout>
...@@ -2,23 +2,15 @@ ...@@ -2,23 +2,15 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:layout_height="90dp" android:layout_height="match_parent"
android:id="@+id/session_picto_layout" android:id="@+id/session_picto_layout"
android:background="@color/picto_default_background" android:background="@color/picto_default_background"
android:padding="@dimen/picto_padding"> android:padding="@dimen/picto_padding">
<ImageView <ImageView
android:id="@+id/session_picto" android:id="@+id/session_picto"
android:layout_height="@dimen/picto_normal_height"
android:layout_width="match_parent"
android:contentDescription="" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/session_picto_time"/> android:layout_width="wrap_content"
android:contentDescription="" />
</LinearLayout> </LinearLayout>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical" android:layout_width="match_parent" android:orientation="vertical" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:background="@color/common_plus_signin_btn_text_dark_disabled"> >
<TextView <TextView
android:text="Nombre" android:text="Nombre"
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
android:textColor="@android:color/black" android:textColor="@android:color/black"
android:layout_alignTop="@+id/photo" android:layout_alignTop="@+id/photo"
android:layout_toEndOf="@+id/photo" android:layout_toEndOf="@+id/photo"
android:layout_width="250dp" android:layout_width="wrap_content"
android:layout_marginStart="15dp" /> android:layout_marginStart="15dp" />
<TextView <TextView
android:text="Apellidos" android:text="Apellidos"
android:layout_width="250dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/label_surname" android:id="@+id/label_surname"
android:textSize="18sp" android:textSize="18sp"
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
app:srcCompat="@drawable/anonymous_student" app:srcCompat="@drawable/anonymous_student"
android:id="@+id/photo" android:id="@+id/photo"
android:layout_weight="0.15" android:layout_weight="0.15"
android:layout_width="50dp" android:layout_width="80dp"
android:layout_height="50dp" android:layout_height="80dp"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:layout_alignParentStart="true" /> android:layout_alignParentStart="true" />
</RelativeLayout> </RelativeLayout>
...@@ -43,6 +43,13 @@ ...@@ -43,6 +43,13 @@
<sourceFolder url="file://$MODULE_DIR$/src/DefaultFlavorDebug/jni" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/DefaultFlavorDebug/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/DefaultFlavorDebug/rs" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/DefaultFlavorDebug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/DefaultFlavorDebug/shaders" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/DefaultFlavorDebug/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/DefaultFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/DefaultFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/DefaultFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/DefaultFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/DefaultFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/DefaultFlavor/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/DefaultFlavor/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavorDebug/res" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavorDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavorDebug/resources" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavorDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavorDebug/assets" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavorDebug/assets" type="java-test-resource" />
...@@ -51,13 +58,6 @@ ...@@ -51,13 +58,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavorDebug/jni" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavorDebug/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavorDebug/rs" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavorDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavorDebug/shaders" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavorDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/DefaultFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/DefaultFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/DefaultFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/DefaultFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/DefaultFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/DefaultFlavor/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/DefaultFlavor/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/DefaultFlavor/res" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/DefaultFlavor/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/DefaultFlavor/resources" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/DefaultFlavor/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/DefaultFlavor/assets" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/DefaultFlavor/assets" type="java-resource" />
...@@ -66,14 +66,6 @@ ...@@ -66,14 +66,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/DefaultFlavor/jni" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/DefaultFlavor/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/DefaultFlavor/rs" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/DefaultFlavor/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/DefaultFlavor/shaders" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/DefaultFlavor/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavor/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavor/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavor/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavor/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavor/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavor/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavor/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavor/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDefaultFlavor/res" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestDefaultFlavor/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDefaultFlavor/resources" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestDefaultFlavor/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDefaultFlavor/assets" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestDefaultFlavor/assets" type="java-test-resource" />
...@@ -82,6 +74,14 @@ ...@@ -82,6 +74,14 @@
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDefaultFlavor/jni" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestDefaultFlavor/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDefaultFlavor/rs" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestDefaultFlavor/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDefaultFlavor/shaders" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestDefaultFlavor/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavor/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavor/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavor/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavor/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavor/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavor/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavor/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDefaultFlavor/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
...@@ -106,14 +106,6 @@ ...@@ -106,14 +106,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
...@@ -122,6 +114,14 @@ ...@@ -122,6 +114,14 @@
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
......
...@@ -106,14 +106,6 @@ ...@@ -106,14 +106,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
...@@ -122,7 +114,17 @@ ...@@ -122,7 +114,17 @@
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/24.2.1/jars" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/24.2.1/jars" />
...@@ -135,11 +137,21 @@ ...@@ -135,11 +137,21 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/24.2.1/jars" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/24.2.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/24.2.1/jars" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/24.2.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-runtime-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-verifier" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-resources" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-support" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/restart-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" /> <excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" /> <excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content> </content>
......
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