// Path: MyViewPager/src/com/itheima/myscrollview28/MyScrollView.java
// public interface MyPageChangedListener{
// 	void moveToDest(int currid);
// }


import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RadioGroup.OnCheckedChangeListener;
import com.itheima.myscrollview28.MyScrollView.MyPageChangedListener;
package com.itheima.myscrollview28;




public class MainActivity extends Activity {

	private MyScrollView msv;
	
	//图片资源ID 数组
	private int[] ids = new int[]{R.drawable.a1,R.drawable.a2,R.drawable.a3,R.drawable.a4,R.drawable.a5,R.drawable.a6};
	
	private RadioGroup radioGroup;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		msv =(MyScrollView) findViewById(R.id.myscroll_view);
		radioGroup = (RadioGroup) findViewById(R.id.radioGroup);
		
	
		
		for (int i = 0; i < ids.length; i++) {
			ImageView image = new ImageView(this);
			image.setBackgroundResource(ids[i]);
			msv.addView(image);
			
			
		}
		
// Path: MyViewPager/src/com/itheima/myscrollview28/MyScrollView.java
// public interface MyPageChangedListener{
// 	void moveToDest(int currid);
// }


// Path: MyViewPager/src/com/itheima/myscrollview28/MainActivity.java
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RadioGroup.OnCheckedChangeListener;
import com.itheima.myscrollview28.MyScrollView.MyPageChangedListener;

package com.itheima.myscrollview28;




public class MainActivity extends Activity {

	private MyScrollView msv;
	
	//图片资源ID 数组
	private int[] ids = new int[]{R.drawable.a1,R.drawable.a2,R.drawable.a3,R.drawable.a4,R.drawable.a5,R.drawable.a6};
	
	private RadioGroup radioGroup;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		msv =(MyScrollView) findViewById(R.id.myscroll_view);
		radioGroup = (RadioGroup) findViewById(R.id.radioGroup);
		
	
		
		for (int i = 0; i < ids.length; i++) {
			ImageView image = new ImageView(this);
			image.setBackgroundResource(ids[i]);
			msv.addView(image);
			
			
		}
		
		msv.setPageChangedListener(new MyPageChangedListener() {