package com.moon.hello2;import java.util.Calendar;import android.R.anim;import android.R.integer;import android.app.Activity;import android.os.Bundle;import android.os.Handler;import android.os.Message;import android.view.Menu;import android.view.View;import android.view.View.OnClickListener;import android.widget.ArrayAdapter;import android.widget.AutoCompleteTextView;import android.widget.Button;import android.widget.DatePicker;import android.widget.ImageView;import android.widget.ProgressBar;import android.widget.RatingBar;import android.widget.RatingBar.OnRatingBarChangeListener;import android.widget.SeekBar;import android.widget.DatePicker.OnDateChangedListener;import android.widget.SeekBar.OnSeekBarChangeListener;import android.widget.TextView;import android.widget.TimePicker;import android.widget.TimePicker.OnTimeChangedListener;public class MainActivity extends Activity { private int status = 0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.setContentView(R.layout.activity_main); final ImageView imageView = (ImageView)findViewById(R.id.imageView1); RatingBar ratingBar = (RatingBar)findViewById(R.id.ratingBar1); ratingBar.setOnRatingBarChangeListener(new OnRatingBarChangeListener() { @Override public void onRatingChanged(RatingBar arg0, float rating, boolean arg2) { // TODO Auto-generated method stub imageView.setAlpha(rating*5/255); } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, menu); return true; }}