Commit 3ee689e3 by German Callejas

Solucionado el tema de las leyendas para que aparezcan en 1 linea

parent 614b18cc
...@@ -43,6 +43,10 @@ public class PictoItemViewGenerator { ...@@ -43,6 +43,10 @@ public class PictoItemViewGenerator {
StringBuffer txt = new StringBuffer(); StringBuffer txt = new StringBuffer();
if(picto.get_legend().equals("full")){
return texto;
}else{
if (words.length == 1) { if (words.length == 1) {
if (words[0].length() >= 11) { if (words[0].length() >= 11) {
texto = ""; texto = "";
...@@ -83,6 +87,7 @@ public class PictoItemViewGenerator { ...@@ -83,6 +87,7 @@ public class PictoItemViewGenerator {
}else{ }else{
texto = words[0]; texto = words[0];
} }
}
return texto; return texto;
} }
...@@ -146,11 +151,11 @@ public class PictoItemViewGenerator { ...@@ -146,11 +151,11 @@ public class PictoItemViewGenerator {
textView.layout(0, 0, 100, 100); textView.layout(0, 0, 100, 100);
textView.setPadding(0, 0, 0, 0); textView.setPadding(0, 0, 0, 0);
textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, 13); textView.setTextSize(PCBcontext.getPcbdb().getCurrentUser().is_picto_size_big() ? 13 : 11);
textView.setTextColor(Color.BLACK); textView.setTextColor(Color.BLACK);
textView.setWidth(100); textView.setWidth(100);
textView.setGravity(Gravity.CENTER_HORIZONTAL); textView.setGravity(Gravity.CENTER_HORIZONTAL);
textView.setMaxLines(2); textView.setMaxLines(3);
textView.setText(texto); textView.setText(texto);
textView.setDrawingCacheEnabled(true); textView.setDrawingCacheEnabled(true);
...@@ -219,6 +224,7 @@ public class PictoItemViewGenerator { ...@@ -219,6 +224,7 @@ public class PictoItemViewGenerator {
legend.setVisibility(View.VISIBLE); legend.setVisibility(View.VISIBLE);
}else { }else {
bm = set_legend(PCBcontext.getContext(), bm, picto); bm = set_legend(PCBcontext.getContext(), bm, picto);
legend.setVisibility(View.GONE);
} }
}else{ }else{
legend.setVisibility(View.GONE); legend.setVisibility(View.GONE);
......
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