oak22 0 ارسال شده در ۱۶ آذر ۱۳۹۵ گزارش اشتراک گذاری ارسال شده در ۱۶ آذر ۱۳۹۵ سلام خدمت همه دوستان عزیز من یه مشکل دارم ..عکسها رو از سرور گرفتم..وریختم دریک لایه که همه عکسها ههم نمایش داده میشن..ومتد زوم هم نوشتم..حالا وقتی روی عکس کلیک میکنم اخرین عکس زوم میشه...عکسهای بعدی همان حالت کوچک دارن... [shcode=xml]LinearLayout galleryView = (LinearLayout)v.findViewById(R.id.layoutPhotos); // galleryView.setContentDescription(i+""); if(clinics.getJSONObject(0).get("photos") instanceof JSONArray){ JSONArray photos = clinic.getJSONArray("photos"); if(photos.length() > 0){ int lenth = photos.length(); //if(lenth > 3) // lenth = 3; for (int j = 0; j < lenth; j++) { JSONObject jo = photos.getJSONObject(j); //imgGal = (ImageView) findViewById(R.id.full_ads_img); imgGal = new ImageView(this); ImageLoader.getInstance().displayImage(jo.getString("image_path"), imgGal, options, animateFirstListener); LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(70, 70); imgGal.setLayoutParams(layoutParams); imgGal.setBackgroundResource(R.drawable.xml_frame_border); galleryView.addView(imgGal); //galleryView.addView(imgGal, layoutParams); ///galleryView.s imgGal.setOnClickListener( new OnClickListener() { @Override public void onClick(View arg0) { // TODO Auto-generated method stub LoadImageFullScreen( imgGal ); } } ); }[/shcode] اینم متد زوم ولی فک نکنم مشکل متد زوم باشه [shcode=xml]public void LoadImageFullScreen( View v ) { try{ AlertDialog.Builder imageLoader = new AlertDialog.Builder(this); LayoutInflater inflater = (LayoutInflater) this.getSystemService( LAYOUT_INFLATER_SERVICE); View layout= inflater.inflate(R.layout.full_screen_image, (ViewGroup) findViewById(R.id.full_img_layout_root)); //ImageView temp = (ImageView) findViewById( imgGal); ImageView bigImage = (ImageView) layout.findViewById( R.id.full_img_img2 ); bigImage.setImageDrawable( imgGal.getDrawable()); TextView imgTitle = (TextView) layout.findViewById( R.id.full_img_title ); imgTitle.setText( R.string.big_image_title ); imageLoader.setView( layout ); imageLoader.setCancelable(true); imageLoader.create(); imageLoader.show(); } catch ( Exception e ){ //Log.i("m","eror" + e.toString()); } }[/shcode] یعنی تمام عکسها مثل قالبها فروشگاهی اوردم تویه لایه عکسها به اینصورت در لایه گذاشتم حالا باکلیک روی هرکدام اخرین عکس نمایش میده نقل قول لینک ارسال به اشتراک گذاری در سایت های دیگر
پست های پیشنهاد شده
به گفتگو بپیوندید
هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .