Android TextView on top of the view

I have a view that I would like a TextView to pop up when an event occurs. I did this before (a long time ago), but I can’t remember how I did it ...

My code for the View element. After adding the TextView, I would like it to appear on top of the top of the view.

public class test extends View { public test(Context context) { super(context); setBackgroundColor(Color.RED); } TextView tv; public void adText(TextView tv){ this.tv =tv; tv.setVisibility(tv.VISIBLE); } } 
+4
source share
1 answer

http://www.curious-creature.org/2009/03/01/android-layout-tricks-3-optimize-part-1/

Decides. Someone will delete this strange comment, please ...

+1
source

All Articles