package com.example.xiong;import android.app.Activity;import android.graphics.Color;import android.os.Bundle;import android.view.View;import android.widget.Button;import android.widget.TextView;public class MainActivity extends Activity {/** Called when the activity is first created. */private TextView txt;private Button btn;@Overridepublic void onCreate(Bundle savedInstanceState){super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);btn=(Button)findViewById(R.id.button1);txt=(TextView)findViewById(R.id.textView1);btn.setOnClickListener(new click() );}class click implements View.OnClickListener{public void onClick(View v){int Black = 0xffcccccc;txt.setText();txt.setTextColor(Color.YELLOW);txt.setBackgroundColor(Black);}}}
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.