本文整理汇总了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();
}
示例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);
}
示例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());
}
}
}
示例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;
}
示例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);
}
示例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;
}
示例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();
}
示例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);
}
示例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;
}
示例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();
}
}
示例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;
}
示例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);
}
}
示例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;
}
示例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;
}
示例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);
}