Pro1Activity.java
package ps.pro1;
import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.widget.RelativeLayout;
import android.widget.TextView;
public class Pro1Activity extends Activity {
/**
* www.master-gtu.blogspot.com
* pankaj sharma(8460479175),
* chavda vijay(8460420769)
*/
RelativeLayout rl;
TextView tvmsg;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
rl=(RelativeLayout) findViewById(R.id.rl);
tvmsg = (TextView) findViewById(R.id.textView1);
rl.setBackgroundColor(Color.WHITE);
tvmsg.setTextColor(Color.RED);
}
}
Thanks Programmer :)
ReplyDeletewhere is the code for displaying the text view in the middle?
ReplyDeletePlease provide the XML file of this program
ReplyDeletehow to run this code in the android studio ??......
ReplyDeletewhere is the xml file without xml file that is not run the programm....