Voilà, ça marche !!!!!!

Même mon MAC qui m'a sauvagement lâché remarche, 3 jours et 350 € plus tard ....

Je suis reparti de ZERO et m'imprégnant de vos conseils, de plusieurs bouquins (je ferai sur ce sujet un post spécial débutants) et en cherchant à faire simple.
J'ai abandonné l'AbsoluteLayer au profit de plusieurs LinearLayer imbriqués.

Voici le main.xml
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
 
<?xml version="1.0" encoding="utf-8"?>
 
<LinearLayout
	xmlns:android="http://schemas.android.com/apk/res/android"
	android:orientation="vertical"
	android:id="@+id/Llayout01"
	android:layout_width="320px"
	android:layout_height="480px">
 
	<LinearLayout
	xmlns:android="http://schemas.android.com/apk/res/android"
	android:orientation="horizontal"
	android:id="@+id/Llayout02"
	android:layout_width="320px"
	android:layout_height="50px">
 
	<Button
	android:text="GOTO"
	android:id="@+id/bGoto"
	android:layout_width="wrap_content" 
	android:layout_height="wrap_content">
	</Button>
 
	<EditText
	android:text="150"
	android:id="@+id/fieldGoto"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content">
	</EditText>
 
	<TextView
	android:text=" ROUTE "
	android:id="@+id/lRoute"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content">
	</TextView>
 
	<EditText
	android:text="200"
	android:id="@+id/fieldRoute"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content">
	</EditText>
 
	<TextView
	android:text="   OBS "
	android:id="@+id/lRoute"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content">
	</TextView>
 
	<EditText
	android:text="100"
	android:id="@+id/fieldObs"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content">
	</EditText>
	</LinearLayout>
 
	<LinearLayout
	xmlns:android="http://schemas.android.com/apk/res/android"
	android:orientation="horizontal"
	android:id="@+id/Llayout03"
	android:layout_width="320px"
	android:layout_height="430px">
	</LinearLayout>
</LinearLayout>
C'est dans le @+id/Llayout03 que je vais dessiner.

La classe monTrace défini la façon de dessiner avec le onDraw et sa boucle provoquée par invalidate();.
En créant l'instance de cette classe :
monTrace traceHsi = new monTrace(null);
et en l'ajoutant à Llayout03
Llayout03.addView(traceHsi) ;
l'animation se produit avec le bouton et les champs actifs.

Gagné, j'ai tous mes morceaux pour continuer ... et buter sur de nouveaux problèmes !
Voici le code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
 
package org.FsiGps.RiAndroid;
 
import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
 
public class MainHsiGpas extends Activity
{
	private Button bGoto = null;
	private EditText fieldGoto;
	private EditText fieldRoute;
	private EditText fieldObs;
	private LinearLayout Llayout03;
	boolean flag01 = true;
	float xA = 0;
	float yA = 0;
	float xB = 100;
	float yB = 100;
	Paint ColTrace = new Paint();
	Paint ColFond = new Paint();
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main); // Doit être en premier !!!
        initSaisies();
        bGoto = (Button)findViewById(R.id.bGoto); // on a la pointeur sur le bouton
        bGoto.setOnClickListener(bGotoListener); // on appelle le listener du bouton
        Llayout03 = (LinearLayout)findViewById(R.id.Llayout03);
        monTrace traceHsi = new monTrace(null);
        Llayout03.addView(traceHsi) ; //, new LayoutParams(320, 380, 0, 0)); // <<<< provoque le plantage
    }
 
	private void initSaisies()// méthode d'initialisation
	{
		// récupération des objets champs et bouton avec leur ressources du main.xml
		fieldGoto= (EditText)findViewById(R.id.fieldGoto);
		fieldRoute = (EditText)findViewById(R.id.fieldRoute);
		fieldObs = (EditText)findViewById(R.id.fieldObs);
	}
 
 
	private void calculate()
	{
		double valGoto = Double.parseDouble(fieldGoto.getText().toString());
		double valRoute = Double.parseDouble(fieldRoute.getText().toString());
		double vTotal = valGoto + valRoute ;
		fieldObs.setText(Double.toString(vTotal));
 
		xA = 0;
		yA = 0;
		xB = 100;
		yB = 100;
		monTrace traceHsi = new monTrace(null);
                Llayout03.addView(traceHsi) ; 
 
	}
 
	// définition de l'action du listener de bGoto
	private OnClickListener bGotoListener = new OnClickListener()
	{
		public void onClick(View v)
		{
			calculate();
		}
	};
 
	protected class monTrace extends View
	{
		public monTrace(Context context) 
		{
			super(context);
			// TODO Auto-generated constructor stub
		}
 
		public void onDraw(Canvas canvas)
		{			
			ColTrace.setColor(Color.BLACK);
			ColFond.setColor(Color.WHITE);
			canvas.drawRect(0, 0, 320, 380, ColFond);
				xA = xA +1;
				yA = yA +1;
				xB = xB + 1;
				yB = yB + 2;
			canvas.drawLine(xA, yA, xB,yB ,ColTrace);
			canvas.drawText("Goto", xB, yB, ColTrace);
			if (xA < 100) invalidate();
 
		}
	}
 
 
}
Comme déjà indiqué, mon besoin est que le dessin soit rafraichi de façon permanente (une fois par seconde) avec des informations qui seront élaborées dans la boucle onDraw (donc pas de pb) et aussi de temps en temps par une saisie dans un des champs .....
Il faut donc que la modification du champ ou l'action sur le bouton relance l'animation avec ce nouveau paramètre.

J'ai trouvé une solution, qui marche, mais qui ne parait bestiale et que je soupçonne d'être une cause de problème.
Dans l'action du bouton, je recrée une nouvelle instance de monTrace que j'ajoute à nouveau à Llayout03 de la façon suivante :
monTrace traceHsi = new monTrace(null);
Llayout03.addView(traceHsi) ;


Que va-t-il se passer en fonctionnement avec cette accumulation d'objets qui vont je ne sais où ?
J'ai vu qu'ANDROID disposait d'un système de nettoyage de la mémoire, s'applique-t-il à ce cas de figure ?

Merci pour vos réponses et encore une fois pour votre aide précieuse.