lundi 18 mai 2015

how to create textView below action bar?

I am quite new to android programming. As I follow the tutorials here,http://ift.tt/1qZfFi1.. I have a problem. When I enable the action bar overlay mode,a textView object I create during runtime is covered by the action bar.

   TextView textView =TextView(this);
   textView.setText(message);//message is given from previous activity
   setContentView(textView);

Is there anyway to fix this? I was thinking getting the height of the action bar and set the margin but I couldn't find a way to get the height programmatically

Aucun commentaire:

Enregistrer un commentaire