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


Java View.setMinimumHeight方法代码示例

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


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

示例1: fuckView

import android.view.View; //导入方法依赖的package包/类
private static void fuckView(View v, boolean shouldVisibility) {

            if (shouldVisibility)
                v.setVisibility(View.GONE);
            v.setWillNotDraw(true);
            ViewGroup.LayoutParams layoutParams = v.getLayoutParams();
            layoutParams.height = 0;
            layoutParams.width = 0;
            v.setPadding(0, 0, 0, 0);
            v.setMinimumHeight(0);
            v.setMinimumWidth(0);

            v.setBackgroundColor(Color.TRANSPARENT);
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
                v.setAlpha(0f);
            }

            v.setLayoutParams(layoutParams);
            v.clearAnimation();
        }
 
开发者ID:w568w,项目名称:fuckView,代码行数:21,代码来源:Hook.java

示例2: setDummyDataWithHeader

import android.view.View; //导入方法依赖的package包/类
protected void setDummyDataWithHeader(ListView listView, int headerHeight, int num) {
    View headerView = new View(this);
    headerView.setLayoutParams(new AbsListView.LayoutParams(AbsListView.LayoutParams.MATCH_PARENT, headerHeight));
    headerView.setMinimumHeight(headerHeight);
    // This is required to disable header's list selector effect
    headerView.setClickable(true);
    setDummyDataWithHeader(listView, headerView, num);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:9,代码来源:BaseActivity.java

示例3: applyMinHeight

import android.view.View; //导入方法依赖的package包/类
/**
 * apply minimum Height in view
 */
public static void applyMinHeight(View view, DynamicProperty property) {
    if (view != null) {
        if (property.type == DynamicProperty.TYPE.DIMEN) {
            view.setMinimumHeight(property.getValueInt());
        }
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:11,代码来源:DynamicHelper.java

示例4: createTabContent

import android.view.View; //导入方法依赖的package包/类
@Override
public View createTabContent(String tag) {
    View v = new View(mContext);
    v.setMinimumWidth(0);
    v.setMinimumHeight(0);
    return v;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:FragmentTabHost.java

示例5: onCreateViewHolder

import android.view.View; //导入方法依赖的package包/类
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_boxing_simple_media_item, parent, false);
    int height = parent.getMeasuredHeight() / 4;
    view.setMinimumHeight(height);
    return new MediaViewHolder(view);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:FirstActivity.java

示例6: createTabContent

import android.view.View; //导入方法依赖的package包/类
@Override
public View createTabContent(String tag) {
    View v = new View(context);
    v.setMinimumWidth(0);
    v.setMinimumHeight(0);
    return v;
}
 
开发者ID:uhuru-mobile,项目名称:mobile-store,代码行数:8,代码来源:TabsAdapter.java

示例7: setRefreshHeaderView

import android.view.View; //导入方法依赖的package包/类
/**
 * @param view
 */
public void setRefreshHeaderView(View view) {
    if(view == null){
        return;
    }
    removeView(mRefreshView);
    this.mRefreshView = view;
    view.setMinimumHeight(HEADER_VIEW_MIN_HEIGHT);
    addView(view);
    getRefreshTrigger().init();
}
 
开发者ID:yangjiantao,项目名称:AndroidUiKit,代码行数:14,代码来源:ISwipeRefreshLayout.java

示例8: setViewAddStatusPadding

import android.view.View; //导入方法依赖的package包/类
/**
 * 设置view添加状态栏高度和设置padding,适用于图片填充到状态栏
 *
 * @param view 需要添加padding的view
 * @param height 该view的原始高度,单位px
 */
public static void setViewAddStatusPadding(View view, int height) {
    if (view == null ||
            Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
        return;
    }
    int barHeight = StatusBarUtil.getStatusBarHeight(view.getContext());
    ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
    layoutParams.height = height + barHeight;
    view.setPadding(view.getPaddingLeft(),
            view.getPaddingTop() + barHeight, view.getPaddingRight(), view
                    .getPaddingBottom());
    view.setMinimumHeight(barHeight);
}
 
开发者ID:imliujun,项目名称:LJFramework,代码行数:20,代码来源:StatusBarUtil.java

示例9: createTabContent

import android.view.View; //导入方法依赖的package包/类
@Override
public View createTabContent(final String tag) {
	View v = new View(mContext);
	v.setMinimumWidth(0);
	v.setMinimumHeight(0);
	return v;
}
 
开发者ID:CactusSoft,项目名称:zabbkit-android,代码行数:8,代码来源:FixedFragmentTabHost.java

示例10: onCreate

import android.view.View; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.archos_info_dialog);
    setCancelable(true);
    setCanceledOnTouchOutside(true);

    View root = findViewById(R.id.dialog_root_layout);
    if (mMinWidth!=0) {
    	root.setMinimumWidth(mMinWidth);
    }
    if (mMinHeight!=0) {
    	root.setMinimumHeight(mMinHeight);
    }

    mTitleView = (TextView) findViewById(R.id.archos_info_title);
    if (mTitle != null) {
        mTitleView.setText(mTitle);
    }
    mSubtitleView = (TextView) findViewById(R.id.archos_info_subtitle);
    if (mSubtitle != null) {
        mSubtitleView.setText(mSubtitle);
    }
    mIconView = (ImageView) findViewById(R.id.archos_info_icon);
    if (mIconDrawable != null) {
        mIconView.setImageDrawable(mIconDrawable);
        setIconSize(mIconDrawable);
    } else if (mIconResId != 0) {
        mIconView.setImageResource(mIconResId);
        setIconSize(mIconResId);
    }

    // Display file info if already available
    if (mFileSelection != null) {
        updateFileSelectionInfo();
    }
}
 
开发者ID:archos-sa,项目名称:aos-MediaLib,代码行数:38,代码来源:InfoDialog.java

示例11: createBottomSheetView

import android.view.View; //导入方法依赖的package包/类
private View createBottomSheetView(){
    View view = LayoutInflater.from(this).inflate(R.layout.activity_cars,(ViewGroup) getWindow().getDecorView(),false);
    view.setMinimumHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
    rvSelected = (RecyclerView) view.findViewById(R.id.rv_cars_list);
    clear_shopping_cars = (LinearLayout)view.findViewById(R.id.clear_shopping_cars);
    clear_shopping_cars.setOnClickListener(this);

    rvSelected.setLayoutManager(new LinearLayoutManager(this));
    mList = SPUtils.getList(MainActivity.this,"mlist");
    selectAdapter = new ShoppingCarAdapter(this,mList);
    selectAdapter.notifyDataSetChanged();
    rvSelected.setAdapter(selectAdapter);
    return view;
}
 
开发者ID:markchylshow,项目名称:Shopping_car_Demo,代码行数:15,代码来源:MainActivity.java

示例12: scaleView

import android.view.View; //导入方法依赖的package包/类
@SuppressLint("NewApi")
public static void scaleView(View view) {
    if (view instanceof TextView) {
        TextView textView = (TextView) view;
        setTextSize(textView, textView.getTextSize());
    }
    ViewGroup.LayoutParams params = (ViewGroup.LayoutParams) view.getLayoutParams();
    if (null != params) {
        int width = INVALID;
        int height = INVALID;
        if (params.width != ViewGroup.LayoutParams.WRAP_CONTENT
                && params.width != ViewGroup.LayoutParams.MATCH_PARENT) {
            width = params.width;
        }
        if (params.height != ViewGroup.LayoutParams.WRAP_CONTENT
                && params.height != ViewGroup.LayoutParams.MATCH_PARENT) {
            height = params.height;
        }
        setViewSize(view, width, height);
        setPadding(view, view.getPaddingLeft(), view.getPaddingTop(), view.getPaddingRight(), view.getPaddingBottom());
    }
    if (view.getLayoutParams() instanceof MarginLayoutParams) {
        MarginLayoutParams mMarginLayoutParams = (MarginLayoutParams) view.getLayoutParams();
        if (mMarginLayoutParams != null) {
            setMargin(view, mMarginLayoutParams.leftMargin, mMarginLayoutParams.topMargin, mMarginLayoutParams.rightMargin, mMarginLayoutParams.bottomMargin);
        }
    }
    if (VERSION.SDK_INT >= 16) {
        int minWidth = scaleValue(view.getContext(), view.getMinimumWidth());
        int minHeight = scaleValue(view.getContext(), view.getMinimumHeight());
        view.setMinimumWidth(minWidth);
        view.setMinimumHeight(minHeight);
    }
}
 
开发者ID:yangchong211,项目名称:YCWeather,代码行数:35,代码来源:ViewUtil.java

示例13: createTabContent

import android.view.View; //导入方法依赖的package包/类
public View createTabContent(String tag) {
    View v = new View(this.mContext);
    v.setMinimumWidth(0);
    v.setMinimumHeight(0);
    return v;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:7,代码来源:FragmentTabHost.java

示例14: createTabContent

import android.view.View; //导入方法依赖的package包/类
public View createTabContent(String tag) {
    View v = new View(mContext);
    v.setMinimumWidth(0);
    v.setMinimumHeight(0);
    return v;
}
 
开发者ID:ericberman,项目名称:MyFlightbookAndroid,代码行数:7,代码来源:MFBMain.java

示例15: onClick

import android.view.View; //导入方法依赖的package包/类
@Override
public void onClick(View view) {
    View edit = view.findViewById(R.id.edit);
    edit.setMinimumHeight(view.findViewById(R.id.lights).getHeight());
    MainActivity.fadeView(true, edit);
}
 
开发者ID:j4velin,项目名称:HueNotifier,代码行数:7,代码来源:RuleAdapter.java


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