android.widget.ImageSwitcher的实例源码

项目:showroom-android    文件CardSliderActivity.java   
private void initSwitchers() {
    temperatureSwitcher = (TextSwitcher) findViewById(R.id.cs_ts_temperature);
    temperatureSwitcher.setFactory(new TextViewFactory(R.style.CstemperatureTextView,true));
    temperatureSwitcher.setCurrentText(temperatures[0]);

    placeSwitcher = (TextSwitcher) findViewById(R.id.cs_ts_place);
    placeSwitcher.setFactory(new TextViewFactory(R.style.CsPlaceTextView,false));
    placeSwitcher.setCurrentText(places[0]);

    clockSwitcher = (TextSwitcher) findViewById(R.id.cs_ts_clock);
    clockSwitcher.setFactory(new TextViewFactory(R.style.CsClockTextView,false));
    clockSwitcher.setCurrentText(times[0]);

    descriptionsSwitcher = (TextSwitcher) findViewById(R.id.cs_ts_description);
    descriptionsSwitcher.setInAnimation(this,android.R.anim.fade_in);
    descriptionsSwitcher.setoutAnimation(this,android.R.anim.fade_out);
    descriptionsSwitcher.setFactory(new TextViewFactory(R.style.CsDescriptionTextView,false));
    descriptionsSwitcher.setCurrentText(getString(descriptions[0]));

    mapSwitcher = (ImageSwitcher) findViewById(R.id.cs_ts_map);
    mapSwitcher.setInAnimation(this,R.anim.cs_fade_in);
    mapSwitcher.setoutAnimation(this,R.anim.cs_fade_out);
    mapSwitcher.setFactory(new ImageViewFactory());
    mapSwitcher.setimageResource(maps[0]);
}
项目:Musicoco    文件PlayThemeCustomActivity.java   
public ViewHolder() {
    imageSwitch = (ImageSwitcher) findViewById(R.id.play_theme_custom_image_switch);
    container = findViewById(R.id.play_theme_custom_container);
    dark = (TextView) findViewById(R.id.play_theme_custom_dark);
    white = (TextView) findViewById(R.id.play_theme_custom_white);
    blur = (TextView) findViewById(R.id.play_theme_custom_blur);
    color = (TextView) findViewById(R.id.play_theme_custom_color);
    gradient = (TextView) findViewById(R.id.play_theme_custom_gradient);
    mask = (TextView) findViewById(R.id.play_theme_custom_mask);
    done = (FloatingActionButton) findViewById(R.id.play_theme_custom_done);

    texts = new TextView[]{
            dark,white,blur,color,gradient,mask
    };

}
项目:Musicoco    文件PlayBgDrawableController.java   
public void initViews() {
    flRootView = (FrameLayout) activity.findViewById(R.id.play_root);
    isBg = (ImageSwitcher) activity.findViewById(R.id.play_bg);

    isBg.setFactory(new ViewSwitcher.ViewFactory() {
        @Override
        public View makeView() {
            ImageView view = new ImageView(activity);
            view.setLayoutParams(new FrameLayout.LayoutParams(
                    FrameLayout.LayoutParams.MATCH_PARENT,FrameLayout.LayoutParams.MATCH_PARENT));
            view.setScaleType(ImageView.ScaleType.CENTER_CROP);
            return view;
        }
    });
}
项目:Musicoco    文件VisualizerFragment.java   
private void initViews() {

        albumView = (ImageSwitcher) view.findViewById(R.id.play_album_is);
        albumView.setFactory(new ViewSwitcher.ViewFactory() {
            @Override
            public View makeView() {
                ImageView imageView = new ImageView(getActivity());
                imageView.setLayoutParams(new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT,FrameLayout.LayoutParams.MATCH_PARENT));
                imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
                int pad = (int) getActivity().getResources().getDimension(R.dimen.play_album_padding);
                imageView.setPadding(pad,pad,pad);
                return imageView;
            }
        });

        displayMetrics metrics = Utils.getMetrics(getActivity());
        //专辑图片直径
        int size = metrics.widthPixels * 2 / 3;
        albumPictureController = new AlbumPictureController(getActivity(),albumView,size);

    }
项目:Musicoco    文件AlbumPictureController.java   
public AlbumPictureController(Context context,final ImageSwitcher view,int size) {
    this.view = view;
    this.size = size;
    this.context = context;
    this.cache = new BitmapCache(context,BitmapCache.CACHE_ALBUM_VISUALIZER_IMAGE);

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
        defaultColor = context.getColor(R.color.default_play_bg_color);
        defaultTextColor = context.getColor(R.color.default_play_text_color);
    } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
        defaultColor = context.getResources().getColor(R.color.default_play_bg_color,null);
        defaultTextColor = context.getResources().getColor(R.color.default_play_text_color,null);
    } else {
        defaultColor = context.getResources().getColor(R.color.default_play_bg_color);
        defaultTextColor = context.getResources().getColor(R.color.default_play_text_color);
    }

    this.bitmapProducer = new BitmapProducer(context);

    colors = new int[]{
            defaultColor,defaultTextColor,defaultColor,defaultTextColor
    };

    rotateAnim = ObjectAnimator.ofFloat(0,360);
    rotateAnim.setDuration(45 * 1000);
    rotateAnim.setRepeatMode(ValueAnimator.RESTART);
    rotateAnim.setRepeatCount(ValueAnimator.INFINITE);
    rotateAnim.setInterpolator(new LinearInterpolator());
    rotateAnim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
        @Override
        public void onAnimationUpdate(ValueAnimator animation) {
            float value = (float) animation.getAnimatedValue();
            view.getCurrentView().setRotation(value);
        }
    });
}
项目:FakeWeather    文件AboutActivity.java   
@Override
protected void initViews(Bundle savedInstanceState) {
    setdisplayHomeAsUpEnabled(true);
    tvVersion = (TextView) findViewById(R.id.tv_app_version);
    tvVersion.setText("v" + BuildConfig.VERSION_NAME);
    imageSwitcher = (ImageSwitcher) findViewById(R.id.imageSwitcher);
    imageSwitcher.setFactory(new ViewSwitcher.ViewFactory() {
        @Override
        public View makeView() {
            ImageView imageView = new ImageView(AboutActivity.this);
            imageView.setScaleType(ImageView.ScaleType.FIT_XY);
            return imageView;
        }
    });
    imageSwitcher.setInAnimation(AnimationUtils.loadAnimation(this,R.anim.zoom_in));
    imageSwitcher.setoutAnimation(AnimationUtils.loadAnimation(this,R.anim.zoom_out));
}
项目:Android-Application-ZJB    文件ZjbImageLoader.java   
private synchronized static void display(String url,View view,displayImageOptions displayImageOptions,ImageLoadingListener imageLoadingListener,ImageLoadingProgressListener imageLoadingProgressListener) {
    try {
        if (view instanceof ImageView) {
            mImageLoader.displayImage(url,new ImageViewAware((ImageView) view),displayImageOptions,imageLoadingListener,imageLoadingProgressListener);
        } else if (view instanceof ImageSwitcher) {
            mImageLoader.displayImage(url,new ImageSwitcherAware(view),imageLoadingProgressListener);
        } else {
            mImageLoader.displayImage(url,new SimpleViewAware(view),imageLoadingProgressListener);
        }
    } catch (OutOfMemoryError e1) {
        e1.printstacktrace();
    } catch (Exception e2) {
        e2.printstacktrace();
    }

}
项目:shikimori    文件CustomCheckBoxFilter.java   
/**
 * Строим список
 */
private void buildViews() {
    llCheckBoxList.removeAllViews();
    for (Box Box : list) {
        View v = inflate(getContext(),R.layout.custom_checkBox_filter,null);
        TextView tvTitle = hs.get(v,R.id.tvTitle);
        ImageSwitcher isImage = hs.get(v,R.id.isImage);

        v.setonClickListener(imageSwitch);
        isImage.setFactory(factory);
        setAnimation(isImage);
        tvTitle.setText(Box.title);
        llCheckBoxList.addView(v);

        prepareCounts(Box);

        isImage.setimageResource(images[Box.status]);
    }
    invalidateCount();
}
项目:shikimori    文件CustomCheckBoxFilter.java   
@Override
public void onClick(View v) {
    ImageSwitcher isImage = hs.get(v,R.id.isImage);
    int position = llCheckBoxList.indexOfChild(v);
    Box Box = list.get(position);

    if(!multy)
        clear(Box);

    Box.status++;
    if(Box.status > 2 || (!negativeStatus && Box.status > 1))
        Box.status = 0;

    upCount(Box);
    invalidateCount();
    isImage.setimageResource(images[Box.status]);
}
项目:ApiDemos    文件ImageSwitcher1.java   
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestwindowFeature(Window.FEATURE_NO_TITLE);

    setContentView(R.layout.image_switcher_1);

    mSwitcher = (ImageSwitcher) findViewById(R.id.switcher);
    mSwitcher.setFactory(this);
    mSwitcher.setInAnimation(AnimationUtils.loadAnimation(this,android.R.anim.fade_in));
    mSwitcher.setoutAnimation(AnimationUtils.loadAnimation(this,android.R.anim.fade_out));

    gallery g = (gallery) findViewById(R.id.gallery);
    g.setAdapter(new ImageAdapter(this));
    g.setonItemSelectedListener(this);
}
项目:yitu    文件YiGuideView.java   
public YiGuideView(Context context,AttributeSet attrs)
{
    super(context,attrs);
    this.context = context;


    LayoutInflater.from(getContext()).inflate(R.layout.yi_guide_view,this);
    mImageSwitcher =  (ImageSwitcher) findViewById(R.id.yi_guide_vs);
    mViewGroup = (LinearLayout) findViewById(R.id.yi_guide_viewgroup);


    WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
    reqWidth = manager.getDefaultdisplay().getWidth();
    reqHeight = manager.getDefaultdisplay().getHeight();
    Log.i(TAG,"reqWidth = " + reqWidth + ",reqHeight =" + reqHeight);
    mImageSwitcher.setonTouchListener(this);
    // ������ͼ����
    mImageSwitcher.setFactory(this);

}
项目:ZalartAndroid    文件AddReportView.java   
public AddReportView(Activity activity) {
    super(activity);

    mBtnPicture = (Button) activity.findViewById(R.id.btnPicture);
    mBtnAddCategory = (Button) activity.findViewById(R.id.add_category);
    mPickDate = (Button) activity.findViewById(R.id.pick_date);
    mPickTime = (Button) activity.findViewById(R.id.pick_time);
    mDeleteReport = (Button) activity.findViewById(R.id.delete_report);
    mLatitude = (EditText) activity.findViewById(R.id.incident_latitude);
    mLongitude = (EditText) activity.findViewById(R.id.incident_longitude);
    gallery = (gallery) activity.findViewById(R.id.gallery);
    mIncidentTitle = (EditText) activity.findViewById(R.id.incident_title);
    mIncidentLocation = (EditText) activity
            .findViewById(R.id.incident_location);
    mIncidentDesc = (EditText) activity.findViewById(R.id.incident_desc);
    mNews = (EditText) activity.findViewById(R.id.report_news);
    mSwitcher = (ImageSwitcher) activity
            .findViewById(R.id.sel_image_switcher);
    mSwitcher.setInAnimation(AnimationUtils.loadAnimation(activity,android.R.anim.fade_in));
    mSwitcher.setoutAnimation(AnimationUtils.loadAnimation(activity,android.R.anim.fade_out));

}
项目:ZalartAndroid    文件ImageSwitchWorker.java   
/**
 * Called when the processing is complete and the final bitmap should be set
 * on the ImageSwitcher.
 * 
 * @param ImageSwitcher
 * @param bitmap
 */
@SuppressWarnings("deprecation")
private void setimageBitmap(ImageSwitcher imageSwitcher,Bitmap bitmap) {
    if (fadeIn) {
        // Transition drawable with a transparent drwabale and the final
        // bitmap
        final TransitionDrawable td = new TransitionDrawable(
                new Drawable[] {
                        new ColorDrawable(android.R.color.transparent),new BitmapDrawable(context.getResources(),bitmap) });
        // Set background to loading bitmap
        imageSwitcher.setBackgroundDrawable(new BitmapDrawable(context
                .getResources(),loadingBitmap));

        imageSwitcher.setimageDrawable(td);
        td.startTransition(FADE_IN_TIME);
    } else {
        imageSwitcher.setimageDrawable(new BitmapDrawable(context
                .getResources(),bitmap));
    }
}
项目:MEng    文件ImageSwitcher1.java   
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestwindowFeature(Window.FEATURE_NO_TITLE);

    setContentView(R.layout.image_switcher_1);

    mSwitcher = (ImageSwitcher) findViewById(R.id.switcher);
    mSwitcher.setFactory(this);
    mSwitcher.setInAnimation(AnimationUtils.loadAnimation(this,android.R.anim.fade_out));

    gallery g = (gallery) findViewById(R.id.gallery);
    g.setAdapter(new ImageAdapter(this));
    g.setonItemSelectedListener(this);
}
项目:codeexamples-android    文件ImageSwitcher1.java   
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestwindowFeature(Window.FEATURE_NO_TITLE);

    setContentView(R.layout.image_switcher_1);

    mSwitcher = (ImageSwitcher) findViewById(R.id.switcher);
    mSwitcher.setFactory(this);
    mSwitcher.setInAnimation(AnimationUtils.loadAnimation(this,android.R.anim.fade_out));

    gallery g = (gallery) findViewById(R.id.gallery);
    g.setAdapter(new ImageAdapter(this));
    g.setonItemSelectedListener(this);
}
项目:deview-2013-samples    文件ImageSwitcher1.java   
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestwindowFeature(Window.FEATURE_NO_TITLE);

    setContentView(R.layout.image_switcher_1);

    mSwitcher = (ImageSwitcher) findViewById(R.id.switcher);
    mSwitcher.setFactory(this);
    mSwitcher.setInAnimation(AnimationUtils.loadAnimation(this,android.R.anim.fade_out));

    gallery g = (gallery) findViewById(R.id.gallery);
    g.setAdapter(new ImageAdapter(this));
    g.setonItemSelectedListener(this);
}
项目:Joszolgalat_Android_App    文件AddReportView.java   
public AddReportView(Activity activity) {
    super(activity);

    mBtnPicture = (Button) activity.findViewById(R.id.btnPicture);
    mBtnAddCategory = (Button) activity.findViewById(R.id.add_category);
    mPickDate = (Button) activity.findViewById(R.id.pick_date);
    mPickTime = (Button) activity.findViewById(R.id.pick_time);
    mDeleteReport = (Button) activity.findViewById(R.id.delete_report);
    mLatitude = (EditText) activity.findViewById(R.id.incident_latitude);
    mLongitude = (EditText) activity.findViewById(R.id.incident_longitude);
    gallery = (gallery) activity.findViewById(R.id.gallery);
    mIncidentTitle = (EditText) activity.findViewById(R.id.incident_title);
    mIncidentLocation = (EditText) activity
            .findViewById(R.id.incident_location);
    mIncidentDesc = (EditText) activity.findViewById(R.id.incident_desc);
    mNews = (EditText) activity.findViewById(R.id.report_news);
    mSwitcher = (ImageSwitcher) activity
            .findViewById(R.id.sel_image_switcher);
    mSwitcher.setInAnimation(AnimationUtils.loadAnimation(activity,android.R.anim.fade_out));
    this.mapView = (MapView) activity.findViewById(R.id.location_map);
}
项目:Joszolgalat_Android_App    文件ImageSwitchWorker.java   
/**
 * Called when the processing is complete and the final bitmap should be set
 * on the ImageSwitcher.
 * 
 * @param ImageSwitcher
 * @param bitmap
 */
private void setimageBitmap(ImageSwitcher imageSwitcher,loadingBitmap));

        imageSwitcher.setimageDrawable(td);
        td.startTransition(FADE_IN_TIME);
    } else {
        imageSwitcher.setimageDrawable(new BitmapDrawable(bitmap));
    }
}
项目:showroom-android    文件CardSliderActivity.java   
@Override
public View makeView() {
    final ImageView imageView = new ImageView(CardSliderActivity.this);
    imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);

    final LayoutParams lp = new ImageSwitcher.LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT);
    imageView.setLayoutParams(lp);

    return imageView;
}
项目:cardslider-android    文件MainActivity.java   
private void initSwitchers() {
    temperatureSwitcher = (TextSwitcher) findViewById(R.id.ts_temperature);
    temperatureSwitcher.setFactory(new TextViewFactory(R.style.TemperatureTextView,true));
    temperatureSwitcher.setCurrentText(temperatures[0]);

    placeSwitcher = (TextSwitcher) findViewById(R.id.ts_place);
    placeSwitcher.setFactory(new TextViewFactory(R.style.PlaceTextView,false));
    placeSwitcher.setCurrentText(places[0]);

    clockSwitcher = (TextSwitcher) findViewById(R.id.ts_clock);
    clockSwitcher.setFactory(new TextViewFactory(R.style.ClockTextView,false));
    clockSwitcher.setCurrentText(times[0]);

    descriptionsSwitcher = (TextSwitcher) findViewById(R.id.ts_description);
    descriptionsSwitcher.setInAnimation(this,android.R.anim.fade_out);
    descriptionsSwitcher.setFactory(new TextViewFactory(R.style.DescriptionTextView,false));
    descriptionsSwitcher.setCurrentText(getString(descriptions[0]));

    mapSwitcher = (ImageSwitcher) findViewById(R.id.ts_map);
    mapSwitcher.setInAnimation(this,R.anim.fade_in);
    mapSwitcher.setoutAnimation(this,R.anim.fade_out);
    mapSwitcher.setFactory(new ImageViewFactory());
    mapSwitcher.setimageResource(maps[0]);

    mapLoadListener = new DecodeBitmapTask.Listener() {
        @Override
        public void onPostExecuted(Bitmap bitmap) {
            ((ImageView)mapSwitcher.getNextView()).setimageBitmap(bitmap);
            mapSwitcher.showNext();
        }
    };
}
项目:cardslider-android    文件MainActivity.java   
@Override
public View makeView() {
    final ImageView imageView = new ImageView(MainActivity.this);
    imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);

    final LayoutParams lp = new ImageSwitcher.LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT);
    imageView.setLayoutParams(lp);

    return imageView;
}
项目:android-project-gallery    文件ImageAutoplayImageSwitcherActivity.java   
@Override
public View makeView()
{
    final ImageView imageView = new ImageView(this);
    imageView.setBackgroundColor(0xff000000);
    // imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
    // FIXME:提供外层进行设置,或者是提供设置.
    // imageView.setScaleType(ImageView.ScaleType.FIT_XY);
    // imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
    // imageView.setLayoutParams(new ImageSwitcher.LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT));
    imageView.setLayoutParams(new ImageSwitcher.LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT));

    return imageView;
}
项目:FaceAI_Android    文件FaceActivity.java   
private void initViews() {
    mPhoto = (ImageView) findViewById(R.id.id_photo);
    mGetimage = (ImageButton) findViewById(R.id.id_getimage);
    mDetect = (TextView) findViewById(R.id.id_detect);
    // mTip = (TextView) findViewById(R.id.id_tip);
    mWaitting = findViewById(R.id.id_waiting);

    gallery = (gallery) findViewById(R.id.id_gallery);
    imageSwitcher = (ImageSwitcher) findViewById(R.id.id_imageSwitcher);
    scrollView = (ScrollView) findViewById(R.id.scrollView1);
    scrollView.setVerticalScrollBarEnabled(false);

}
项目:ssj    文件Visual.java   
protected void updateImageSwitcher(final ImageSwitcher view,final Drawable img)
{
    view.post(new Runnable()
    {
        public void run()
        {
            view.setimageDrawable(img);
        }
    });
}
项目:ssj    文件VisualFeedback.java   
private void clearIcons()
{
    for (ImageSwitcher imageSwitcher : imageSwitcherList)
    {
        updateImageSwitcher(imageSwitcher,null);
    }
}
项目:ssj    文件VisualFeedback.java   
private void updateImageSwitcher(final ImageSwitcher imageSwitcher,final Drawable drawable)
{
    imageSwitcher.post(new Runnable()
    {
        public void run()
        {
            imageSwitcher.setimageDrawable(drawable);
        }
    });
}
项目:camera    文件PictrueView.java   
@Override
public View makeView()
{
    ImageView imageView = new ImageView(this);
    imageView.setBackgroundColor(0xFF000000);
    imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
    imageView.setLayoutParams(new ImageSwitcher.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));

    return imageView;
}
项目:Android-Application-ZJB    文件ZjbImageLoader.java   
/**
 * 得到url对应的硬盘缓存数据(url没有加七牛的信息)
 *
 * @param url  原始的url
 * @param view 原始的url显示的控件,这个控件是用来计算宽高用的
 * @return
 */
public static String getdiskCachePath(String url,View view) {
    ImageAware aware;
    if (view instanceof ImageView) {
        aware = new ImageViewAware((ImageView) view);
    } else if (view instanceof ImageSwitcher) {
        aware = new ImageSwitcherAware(view);
    } else {
        aware = new SimpleViewAware(view);
    }
    return getdiskCachePath(url,aware.getWidth(),aware.getHeight());
}
项目:open-wheels    文件CustomizationActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    this.setContentView(R.layout.customize_activity);
    switcher = (ImageSwitcher) findViewById(R.id.imageSwitcher);
    accelerationBar = (ProgressBar) findViewById(R.id.progressBar_customize_acceleration);
    speedBar = (ProgressBar) findViewById(R.id.progressBar_customize_speed);
    weightBar = (ProgressBar) findViewById(R.id.progressBar_customize_weight);
    carNameView = (TextView) findViewById(R.id.textViewCarName);

    switcher.setFactory(new ViewSwitcher.ViewFactory() {
        @Override
        public View makeView() {

            ImageView myView = new ImageView(getApplicationContext());
            FrameLayout.LayoutParams params = new FrameLayout.LayoutParams
                    (FrameLayout.LayoutParams.MATCH_PARENT,FrameLayout.LayoutParams.MATCH_PARENT);
            myView.setLayoutParams(params);
            myView.setScaleType(ImageView.ScaleType.FIT_CENTER);
            return myView;
        }
    });

    slide_in_left = AnimationUtils.loadAnimation(this,android.R.anim.slide_in_left);
    slide_out_right = AnimationUtils.loadAnimation(this,android.R.anim.slide_out_right);
    slide_in_right = AnimationUtils.loadAnimation(this,R.anim.slide_in_right);
    slide_out_left = AnimationUtils.loadAnimation(this,R.anim.slide_out_left);



    loadCars();
    updateData();

}
项目:Android-HowOld    文件FaceActivity.java   
private void initViews() {
    mPhoto = (ImageView) findViewById(R.id.id_photo);
    mGetimage = (ImageButton) findViewById(R.id.id_getimage);
    mDetect = (TextView) findViewById(R.id.id_detect);
    // mTip = (TextView) findViewById(R.id.id_tip);
    mWaitting = findViewById(R.id.id_waiting);

    gallery = (gallery) findViewById(R.id.id_gallery);
    imageSwitcher = (ImageSwitcher) findViewById(R.id.id_imageSwitcher);
    scrollView = (ScrollView) findViewById(R.id.scrollView1);
    scrollView.setVerticalScrollBarEnabled(false);

}
项目:android-project-wo2b    文件ImageAutoplayImageSwitcherActivity.java   
@Override
public View makeView()
{
    final ImageView imageView = new ImageView(this);
    imageView.setBackgroundColor(0xff000000);
    // imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
    // FIXME:提供外层进行设置,LayoutParams.MATCH_PARENT));

    return imageView;
}
项目:TapsOfFire    文件ImageTutorialView.java   
public View makeView() {
    LayoutInflater inflater=(LayoutInflater)getContext().
        getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View view=inflater.inflate(R.layout.image_tutorial_item,null);
    view.findViewById(R.id.image).setonClickListener(this);
       view.setLayoutParams(new ImageSwitcher.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
    return view;
}
项目:shikimori    文件CustomCheckBoxFilter.java   
/**
 * Анимация смены плюсика на минус и наоборот
 * @param isImage
 */
void setAnimation(ImageSwitcher isImage){
    if(Build.VERSION.SDK_INT > 10){
        Animation in = AnimationUtils.loadAnimation(getContext(),R.anim.checkBox_animation_in);
        Animation out = AnimationUtils.loadAnimation(getContext(),R.anim.checkBox_animation_out);
        isImage.setInAnimation(in);
        isImage.setoutAnimation(out);
    }
}
项目:ApiDemos    文件ImageSwitcher1.java   
public View makeView() {
    ImageView i = new ImageView(this);
    i.setBackgroundColor(0xFF000000);
    i.setScaleType(ImageView.ScaleType.FIT_CENTER);
    i.setLayoutParams(new ImageSwitcher.LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT));
    return i;
}
项目:Android-Notification    文件ViewSwitcherWrapper.java   
@Override
public void setimageDrawable(Drawable drawable,boolean animate) {
    View view = getView();
    if (view == null) {
        return;
    }

    ImageSwitcher imageSwitcher = (ImageSwitcher) view;
    if (animate) {
        imageSwitcher.setimageDrawable(drawable);
    } else {
        ImageView curr = (ImageView) imageSwitcher.getCurrentView();
        curr.setimageDrawable(drawable);
    }
}
项目:HeartRateMonitor    文件TutorialsCardActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setTheme(R.style.CustomTutorialTheme);
    setContentView(R.layout.tutorials_card);
    this.entries = (ArrayList<TutorialEntry>) getIntent().getSerializableExtra("entries");
    switcher = (ImageSwitcher) findViewById(R.id.imageSwitcher);
    next = (Button) findViewById(R.id.nextButton);
    descriptionText = (TextView) findViewById(R.id.descriptionText);
    prevIoUs = (Button) findViewById(R.id.prevIoUsButton);
    prevIoUs.setVisibility(View.INVISIBLE);
    next.setonClickListener(this);
    prevIoUs.setonClickListener(this);
    switcher.setFactory(new ViewSwitcher.ViewFactory() {
        @Override
        public View makeView() {
            ImageView myView = new ImageView(getApplicationContext());
            myView.setScaleType(ImageView.ScaleType.FIT_CENTER);
            myView.setLayoutParams(new ImageSwitcher.LayoutParams(LayoutParams.
                    FILL_PARENT,ViewGroup.LayoutParams.FILL_PARENT));
            myView.setimageResource(entries.get(index).image);
            return myView;
        }
    });

    // Gesture detection
    gestureDetector = new GestureDetector(this,new SwipeGestureDetector());
    gestureListener = new View.OnTouchListener() {
        public boolean onTouch(View v,MotionEvent event) {
            return gestureDetector.onTouchEvent(event);
        }
    };
    descriptionText.setText(entries.get(index).description);

    // Do this for each view added to the grid
    switcher.setonTouchListener(gestureListener);
}
项目:cvRecognition    文件Imagegallery.java   
public View makeView() {
    ImageView i = new ImageView(this);
    i.setBackgroundColor(0xFF000000);
    i.setScaleType(ImageView.ScaleType.FIT_CENTER);
    i.setLayoutParams(new ImageSwitcher.LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT));
    return i;
}
项目:ZalartAndroid    文件AddReportActivity.java   
@Override
public View makeView() {
    ImageView i = new ImageView(this);
    i.setAdjustViewBounds(true);
    i.setScaleType(ImageView.ScaleType.FIT_CENTER);
    i.setLayoutParams(new ImageSwitcher.LayoutParams(
            android.view.ViewGroup.LayoutParams.WRAP_CONTENT,android.view.ViewGroup.LayoutParams.WRAP_CONTENT));

    return i;
}
项目:ZalartAndroid    文件ImageSwitchWorker.java   
public void loadImage(Object data,ImageSwitcher imageSwitcher,boolean fullScale,int width) {

    final BitmapWorkerTask task = new BitmapWorkerTask(imageSwitcher);
    final AsyncDrawable asyncDrawable = new AsyncDrawable(
            context.getResources(),loadingBitmap,task);
    imageSwitcher.setimageDrawable(asyncDrawable);
    task.fullScale = fullScale;
    task.width = width;
    task.imageSwitcher = imageSwitcher;
    task.execute(data);
}
项目:MEng    文件ImageSwitcher1.java   
public View makeView() {
    ImageView i = new ImageView(this);
    i.setBackgroundColor(0xFF000000);
    i.setScaleType(ImageView.ScaleType.FIT_CENTER);
    i.setLayoutParams(new ImageSwitcher.LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT));
    return i;
}

相关文章

买水果
比较全面的redis工具类
gson 反序列化到多态子类
java 版本的 mb_strwidth
JAVA 反转字符串的最快方法,大概比StringBuffer.reverse()性...
com.google.gson.internal.bind.ArrayTypeAdapter的实例源码...