رفتن به مطلب
انجمن اندروید ایران | آموزش برنامه نویسی اندروید و موبایل
  • android.png.1fab383bc8500cd93127cebc65b1dcab.png

پست های پیشنهاد شده

سلام خدمت همه دوستان عزیز من یه مشکل دارم ..عکسها رو از سرور گرفتم..وریختم دریک لایه که همه عکسها ههم نمایش داده میشن..ومتد زوم هم نوشتم..حالا وقتی روی عکس کلیک میکنم اخرین عکس زوم میشه...عکسهای بعدی همان حالت کوچک دارن...

[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]


یعنی تمام عکسها مثل قالبها فروشگاهی اوردم تویه لایه


1475144452_motion_graphic_tutorilas_ads.jpg

عکسها به اینصورت در لایه گذاشتم حالا باکلیک روی هرکدام اخرین عکس نمایش میده

لینک ارسال
به اشتراک گذاری در سایت های دیگر

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...