當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。