No puedo cambiar el color de la vista,
todo está en blanco: (
paquete com.example.canvasproyect;
android.os.Bundle importación;
importar android.app.Activity;
importar android.content.Context;
android.graphics.Canvas importación;
importar android.graphics.Color;
importar android.graphics.Paint;
importar android.graphics.Rect;
importar android.view.Menu;
importar android.view.View;
android.view.Window importación;
MainActivity clase pública se extiende Activity {
@ Override
protected void onCreate (Bundle savedInstanceState) {
super.onCreate (savedInstanceState);
hacer dibujo = new render (this);
setContentView (dibujo);
}
clase render extiende Ver {
Pintura pintura = new Paint ();
render público (contexto Contexto) {
super (contexto);
}
public void OnDraw (lienzo Canvas) {
/ / Super.onDraw (lienzo);
pintura.setColor (Color.BLUE);
canvas.drawColor (Color.BLUE);
canvas.drawLine (200, 200, 200, 200, pintura);
}
}
@ Override
onCreateOptionsMenu public boolean (menu Menu) {
/ / Inflar el menú, lo que añade elementos a la barra de acción, si
está presente.
. getMenuInflater () inflar (R.menu.main, menú);
return true;
}
}
--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.