]> matita.cs.unibo.it Git - logicplayer.git/blobdiff - mainActivity/src/com/example/furt/myapplication/touchnodeHandler.java
Dirty hack to improve size computation for hypotheses.
[logicplayer.git] / mainActivity / src / com / example / furt / myapplication / touchnodeHandler.java
index 002fb00a2020bc831a9b6aff7eb4d79b286c41f4..237a7cd3d563c9189725d965ed93b012e756e47d 100755 (executable)
@@ -82,17 +82,17 @@ public class touchnodeHandler implements View.OnClickListener {
             final TextView newT=new TextView(view.getContext());
             RelativeLayout.LayoutParams myP=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
             newT.setText(n.NodeHP.get(i).HP.toString());
-            newT.setTextSize(TypedValue.COMPLEX_UNIT_SP,30);
+            newT.setTextSize(20);
             newT.setId(DrawActivity.globalId++);
             if (i==0) //prima ipotesi: sarà il leftID per le successive
                 leftID=newT.getId();
             myP.setMargins(50,0,0,0);
             float thisSize;
-            p.setTextSize(30);
+            p.setTextSize(20);
             thisSize=p.measureText(newT.getText().toString()); //misuro la larghezza dell'ipotesi inserita
             thisSize+=thisSize*0.2; //con un'approssimazione per eccesso del 20%
             sum+=thisSize; //aggiungo alla somma totale la larghezza di questa ipotesi e della spaziatura
-            sum+=50;
+            sum+=100;
             if (sum>(DrawActivity.v.widthPixels+20)) //ho superato la larghezza dello schermo: devo andare a capo
             {
                 sum=thisSize; //il nuovo nodo è il primo della nuova riga