Вопрос по android, android-viewpager, android-layout, android-emulator – Как добавить индикатор выполнения в ViewPager в Android

1

Error: User Rate Limit ExceededViewPagerError: User Rate Limit Exceeded

Error: User Rate Limit ExceededViewPagerError: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceededlazy loadingError: User Rate Limit Exceeded Shashank_Itmaster

Ваш Ответ

2   ответа
3

@Override
            public Object instantiateItem(View collection, final int position) {

                LayoutInflater inflater = (LayoutInflater) collection.getContext()
                        .getSystemService(Context.LAYOUT_INFLATER_SERVICE);


                final FrameLayout imageLayout = (FrameLayout) inflater.inflate(R.layout.fotopager_buttons, null);
                final ImageView imageView = (ImageView) imageLayout.findViewById(R.id.image);
                final ProgressBar spinner = (ProgressBar) imageLayout.findViewById(R.id.loading);

                imageLoader.displayImage(Gallery.get_big_image_url(position), imageView, options, new ImageLoadingListener() {
                    @Override
                    public void onLoadingStarted() {
                    spinner.setVisibility(View.VISIBLE);
                    }

                    @Override
                    public void onLoadingFailed() {
                    spinner.setVisibility(View.GONE);
                    imageView.setImageResource(android.R.drawable.ic_delete);
                    }

                    @Override
                    public void onLoadingComplete() {
                    spinner.setVisibility(View.GONE);
                    }
                    });


                views.put(position, iv);

                ((ViewPager) collection).addView(imageLayout,0);

                return imageLayout;
}

<?xml version="1.0" encoding="utf-8"?>

<ImageView
    android:id="@+id/image"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:adjustViewBounds="true" />

<ProgressBar
    android:id="@+id/loading"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"/>

Error: User Rate Limit Exceeded Kalai Selvan.G
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded
0

Error: User Rate Limit Exceeded Kalai Selvan.G

Похожие вопросы