Java Code Examples for android.view.View.setMinimumHeight()

The following are Jave code examples for showing how to use setMinimumHeight() of the android.view.View class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: fuckView   File: Hook.java   Source Code and License Vote up 6 votes
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();
        }
 
Example 2
Project: GitHub   File: BaseActivity.java   Source Code and License Vote up 5 votes
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);
}
 
Example 3
Project: GitHub   File: DynamicHelper.java   Source Code and License Vote up 5 votes
/**
 * 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());
        }
    }
}
 
Example 4
Project: GitHub   File: FragmentTabHost.java   Source Code and License Vote up 5 votes
@Override
public View createTabContent(String tag) {
    View v = new View(mContext);
    v.setMinimumWidth(0);
    v.setMinimumHeight(0);
    return v;
}
 
Example 5
Project: GitHub   File: FirstActivity.java   Source Code and License Vote up 5 votes
@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);
}
 
Example 6
Project: cniao5   File: FragmentTabHost.java   Source Code and License Vote up 5 votes
@Override
public View createTabContent(String tag) {
    View v = new View(mContext);
    v.setMinimumWidth(0);
    v.setMinimumHeight(0);
    return v;
}
 
Example 7
Project: mobile-store   File: TabsAdapter.java   Source Code and License Vote up 5 votes
@Override
public View createTabContent(String tag) {
    View v = new View(context);
    v.setMinimumWidth(0);
    v.setMinimumHeight(0);
    return v;
}
 
Example 8
Project: boxing   File: FirstActivity.java   Source Code and License Vote up 5 votes
@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);
}
 
Example 9
Project: AndroidUiKit   File: ISwipeRefreshLayout.java   Source Code and License Vote up 5 votes
/**
 * @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();
}
 
Example 10
Project: LJFramework   File: StatusBarUtil.java   Source Code and License Vote up 5 votes
/**
 * 设置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);
}
 
Example 11
Project: GongXianSheng   File: FragmentTabHost.java   Source Code and License Vote up 5 votes
@Override
public View createTabContent(String tag) {
    View v = new View(mContext);
    v.setMinimumWidth(0);
    v.setMinimumHeight(0);
    return v;
}
 
Example 12
Project: zabbkit-android   File: FixedFragmentTabHost.java   Source Code and License Vote up 5 votes
@Override
public View createTabContent(final String tag) {
	View v = new View(mContext);
	v.setMinimumWidth(0);
	v.setMinimumHeight(0);
	return v;
}
 
Example 13
Project: aos-MediaLib   File: InfoDialog.java   Source Code and License Vote up 5 votes
@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();
    }
}
 
Example 14
Project: Shopping_car_Demo   File: MainActivity.java   Source Code and License Vote up 5 votes
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;
}
 
Example 15
Project: YCWeather   File: ViewUtil.java   Source Code and License Vote up 5 votes
@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);
    }
}
 
Example 16
Project: letv   File: FragmentTabHost.java   Source Code and License Vote up 4 votes
public View createTabContent(String tag) {
    View v = new View(this.mContext);
    v.setMinimumWidth(0);
    v.setMinimumHeight(0);
    return v;
}
 
Example 17
Project: MyFlightbookAndroid   File: MFBMain.java   Source Code and License Vote up 4 votes
public View createTabContent(String tag) {
    View v = new View(mContext);
    v.setMinimumWidth(0);
    v.setMinimumHeight(0);
    return v;
}
 
Example 18
Project: HueNotifier   File: RuleAdapter.java   Source Code and License Vote up 4 votes
@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);
}
 
Example 19
Project: boohee_v5.6   File: FragmentTabHost.java   Source Code and License Vote up 4 votes
public View createTabContent(String tag) {
    View v = new View(this.mContext);
    v.setMinimumWidth(0);
    v.setMinimumHeight(0);
    return v;
}