标签:des ar java for sp on 问题 ad 时间
问题描述private void initUI(Context context) { LayoutInflater.from(context).inflate(R.layout.layout_slideshow, this, true); mLyTest= (ViewGroup) findViewById(R.id.ly_test); int num = 0; for (int imageID : this.getImagesResIds()) { ImageView view = new ImageView(context); view.setImageResource(imageID); view.setScaleType(ScaleType.FIT_XY); imageViewsList.add(view); LayoutParams lp = new LayoutParams(63, 63,1); lp.setMargins(500, 50, 500, 50); ImageView viewImage = new ImageView(mContext); viewImage.setId(imageID); viewImage.setLayoutParams(lp); viewImage.setPadding(50, 0, 50, 0); if (num==0) { viewImage.setBackgroundResource(R.drawable.dot_focused); num++; }else { viewImage.setBackgroundResource(R.drawable.dot_normal); } mLyTest.addView(viewImage); } // // dotViewsList.add(findViewById(R.id.v_dot1)); // dotViewsList.add(findViewById(R.id.v_dot2)); viewPager = (ViewPager) findViewById(R.id.viewPager); viewPager.setFocusable(true); viewPager.setAdapter(new MyPagerAdapter()); viewPager.setOnPageChangeListener(new MyPageChangeListener()); }解决方案1
标签:des ar java for sp on 问题 ad 时间
原文地址:http://www.cnblogs.com/yiguobei99/p/4027489.html