当前位置: 首页>>代码示例>>Java>>正文


Java ImageView.setMinimumHeight方法代码示例

本文整理汇总了Java中android.widget.ImageView.setMinimumHeight方法的典型用法代码示例。如果您正苦于以下问题:Java ImageView.setMinimumHeight方法的具体用法?Java ImageView.setMinimumHeight怎么用?Java ImageView.setMinimumHeight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.widget.ImageView的用法示例。


在下文中一共展示了ImageView.setMinimumHeight方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: forceDownload

import android.widget.ImageView; //导入方法依赖的package包/类
/**
 * Same as download but the image is always downloaded and the cache is not
 * used. Kept private at the moment as its interest is not clear.
 */
private void forceDownload(Integer position, ImageView imageView, int rotate) {
    if (position == null) {
        imageView.setImageDrawable(null);
        return;
    }

    if (cancelPotentialDownload(position, imageView)) {
        BitmapFetcherTask task = new BitmapFetcherTask(imageView.getContext(), imageView, rotate);
        DownloadedDrawable downloadedDrawable = new DownloadedDrawable(imageView.getContext(), task, origId);
        imageView.setImageDrawable(downloadedDrawable);
        imageView.setMinimumHeight(colWidth);

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
            task.executeOnExecutor(executor, position);
        } else {
            try {
                task.execute(position);
            } catch (RejectedExecutionException e) {
                // Oh :(
            }
        }

    }
}
 
开发者ID:abelabbesnabi,项目名称:cordova-plugin-image-picker,代码行数:29,代码来源:ImageFetcher.java

示例2: draw

import android.widget.ImageView; //导入方法依赖的package包/类
public void draw() {

        windowManager = (WindowManager) getSystemService(WINDOW_SERVICE);
        Display deviceDisplay = windowManager.getDefaultDisplay();
        Point point = new Point();
        deviceDisplay.getSize(point);
        deviceWidth = point.x;
        deviceHeight = point.y;

        imageView = new ImageView(this);
        imageView.setClickable(false);
        imageView.setFocusable(false);
        imageView.setMinimumHeight(deviceHeight);
        imageView.setMinimumWidth(deviceWidth);

        drawKeylines();

    }
 
开发者ID:balsikandar,项目名称:KeylineMaterialDesign,代码行数:19,代码来源:KeylineDrawService.java

示例3: init

import android.widget.ImageView; //导入方法依赖的package包/类
private void init(Context context) {
	mFlipAnimation = new RotateAnimation(0, -180,
			RotateAnimation.RELATIVE_TO_SELF, 0.5f,
			RotateAnimation.RELATIVE_TO_SELF, 0.5f);
	mFlipAnimation.setInterpolator(new LinearInterpolator());
	mFlipAnimation.setDuration(250);
	mFlipAnimation.setFillAfter(true);
	mReverseFlipAnimation = new RotateAnimation(-180, 0,
			RotateAnimation.RELATIVE_TO_SELF, 0.5f,
			RotateAnimation.RELATIVE_TO_SELF, 0.5f);
	mReverseFlipAnimation.setInterpolator(new LinearInterpolator());
	mReverseFlipAnimation.setDuration(250);
	mReverseFlipAnimation.setFillAfter(true);

	mRefreshView = (LinearLayout) View.inflate(context, R.layout.pull_to_refresh_header, null);
	mRefreshViewText = (TextView) mRefreshView.findViewById(R.id.pull_to_refresh_text);
	mRefreshViewImage = (ImageView) mRefreshView.findViewById(R.id.pull_to_refresh_image);
	mRefreshViewProgress = (ProgressBar) mRefreshView.findViewById(R.id.pull_to_refresh_progress);
	mRefreshViewLastUpdated = (TextView) mRefreshView.findViewById(R.id.pull_to_refresh_updated_at);

	mRefreshState = PULL_TO_REFRESH;
	mRefreshViewImage.setMinimumHeight(50); //设置下拉最小的高度为50
	
	setFadingEdgeLength(0);
	setHeaderDividersEnabled(false);

	//把refreshview加入到listview的头部
	addHeaderView(mRefreshView);
	super.setOnScrollListener(this);
	mRefreshView.setOnClickListener(this);

	mRefreshView.measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED);
	mRefreshViewHeight = mRefreshView.getMeasuredHeight();
	mRefreshOriginalTopPadding = -mRefreshViewHeight;
	
	resetHeaderPadding();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:38,代码来源:PullToRefreshListView.java

示例4: init

import android.widget.ImageView; //导入方法依赖的package包/类
private void init(Context context) {
    inflater = LayoutInflater.from(context);
    headView = (LinearLayout) inflater.inflate(R.layout.kf5_list_head, null);
    arrowImageView = (ImageView) headView.findViewById(R.id.kf5_head_arrowImageView);
    arrowImageView.setMinimumWidth(70);
    arrowImageView.setMinimumHeight(50);
    progressBar = (ProgressBar) headView.findViewById(R.id.kf5_head_progressBar);
    tipsTextview = (TextView) headView.findViewById(R.id.kf5_head_tipsTextView);
    lastUpdatedTextView = (TextView) headView.findViewById(R.id.kf5_head_lastUpdatedTextView);
    measureView(headView);
    headContentHeight = headView.getMeasuredHeight();
    headContentWidth = headView.getMeasuredWidth();
    headView.setPadding(0, -1 * headContentHeight, 0, 0);
    headView.invalidate();
    addHeaderView(headView);
    setOnScrollListener(this);
    animation = new RotateAnimation(0, -180,
            RotateAnimation.RELATIVE_TO_SELF, 0.5f,
            RotateAnimation.RELATIVE_TO_SELF, 0.5f);
    animation.setInterpolator(new LinearInterpolator());
    animation.setDuration(250);
    animation.setFillAfter(true);
    reverseAnimation = new RotateAnimation(-180, 0,
            RotateAnimation.RELATIVE_TO_SELF, 0.5f,
            RotateAnimation.RELATIVE_TO_SELF, 0.5f);
    reverseAnimation.setInterpolator(new LinearInterpolator());
    reverseAnimation.setDuration(200);
    reverseAnimation.setFillAfter(true);

    state = DONE;
    isRefreshable = false;
}
 
开发者ID:Zyj163,项目名称:yyox,代码行数:33,代码来源:RefreshListView.java

示例5: constructItem

import android.widget.ImageView; //导入方法依赖的package包/类
private PieItem constructItem(int width, ButtonType type, Drawable image, int minimumImageSize) {
    ImageView view = new ImageView(mContext);
    view.setImageDrawable(image);
    view.setMinimumWidth(minimumImageSize);
    view.setMinimumHeight(minimumImageSize);
    LayoutParams lp = new LayoutParams(minimumImageSize, minimumImageSize);
    view.setLayoutParams(lp);
    PieItem item = new PieItem(mContext, mGbContext, mPieContainer, 0, width, type, view, mColorInfo);
    item.setOnClickListener(this);
    item.setOnLongPressListener(mLongPressHandler);
    return item;
}
 
开发者ID:WrBug,项目名称:GravityBox,代码行数:13,代码来源:PieController.java


注:本文中的android.widget.ImageView.setMinimumHeight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。