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


Java IcsLinearLayout类代码示例

本文整理汇总了Java中com.actionbarsherlock.internal.widget.IcsLinearLayout的典型用法代码示例。如果您正苦于以下问题:Java IcsLinearLayout类的具体用法?Java IcsLinearLayout怎么用?Java IcsLinearLayout使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: setLinearLayoutDividerPadding

import com.actionbarsherlock.internal.widget.IcsLinearLayout; //导入依赖的package包/类
@Override
public void setLinearLayoutDividerPadding(LinearLayout l, int padding) {
    if(l instanceof IcsLinearLayout) {
        ((IcsLinearLayout)l).supportSetDividerPadding(padding);
    }
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:7,代码来源:Utility4.java

示例2: setLinearLayoutDividerDrawable

import com.actionbarsherlock.internal.widget.IcsLinearLayout; //导入依赖的package包/类
@Override
public void setLinearLayoutDividerDrawable(LinearLayout l, Drawable drawable) {
    if(l instanceof IcsLinearLayout) {
        ((IcsLinearLayout)l).supportSetDividerDrawable(drawable);
    }
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:7,代码来源:Utility4.java

示例3: ActivityChooserView

import com.actionbarsherlock.internal.widget.IcsLinearLayout; //导入依赖的package包/类
/**
 * Create a new instance.
 *
 * @param context The application environment.
 * @param attrs A collection of attributes.
 * @param defStyle The default style to apply to this view.
 */
public ActivityChooserView(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
    mContext = context;

    TypedArray attributesArray = context.obtainStyledAttributes(attrs,
            R.styleable.SherlockActivityChooserView, defStyle, 0);

    mInitialActivityCount = attributesArray.getInt(
            R.styleable.SherlockActivityChooserView_initialActivityCount,
            ActivityChooserViewAdapter.MAX_ACTIVITY_COUNT_DEFAULT);

    Drawable expandActivityOverflowButtonDrawable = attributesArray.getDrawable(
            R.styleable.SherlockActivityChooserView_expandActivityOverflowButtonDrawable);

    attributesArray.recycle();

    LayoutInflater inflater = LayoutInflater.from(mContext);
    inflater.inflate(R.layout.abs__activity_chooser_view, this, true);

    mCallbacks = new Callbacks();

    mActivityChooserContent = (IcsLinearLayout) findViewById(R.id.abs__activity_chooser_view_content);
    mActivityChooserContentBackground = mActivityChooserContent.getBackground();

    mDefaultActivityButton = (FrameLayout) findViewById(R.id.abs__default_activity_button);
    mDefaultActivityButton.setOnClickListener(mCallbacks);
    mDefaultActivityButton.setOnLongClickListener(mCallbacks);
    mDefaultActivityButtonImage = (ImageView) mDefaultActivityButton.findViewById(R.id.abs__image);

    mExpandActivityOverflowButton = (FrameLayout) findViewById(R.id.abs__expand_activities_button);
    mExpandActivityOverflowButton.setOnClickListener(mCallbacks);
    mExpandActivityOverflowButtonImage =
        (ImageView) mExpandActivityOverflowButton.findViewById(R.id.abs__image);
    mExpandActivityOverflowButtonImage.setImageDrawable(expandActivityOverflowButtonDrawable);

    mAdapter = new ActivityChooserViewAdapter();
    mAdapter.registerDataSetObserver(new DataSetObserver() {
        @Override
        public void onChanged() {
            super.onChanged();
            updateAppearance();
        }
    });

    Resources resources = context.getResources();
    mListPopupMaxWidth = Math.max(resources.getDisplayMetrics().widthPixels / 2,
          resources.getDimensionPixelSize(R.dimen.abs__config_prefDialogWidth));
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:56,代码来源:ActivityChooserView.java

示例4: ActivityChooserView

import com.actionbarsherlock.internal.widget.IcsLinearLayout; //导入依赖的package包/类
/**
 * Create a new instance.
 *
 * @param context  The application environment.
 * @param attrs    A collection of attributes.
 * @param defStyle The default style to apply to this view.
 */
public ActivityChooserView(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
    mContext = context;

    TypedArray attributesArray = context.obtainStyledAttributes(attrs,
            R.styleable.SherlockActivityChooserView, defStyle, 0);

    mInitialActivityCount = attributesArray.getInt(
            R.styleable.SherlockActivityChooserView_initialActivityCount,
            ActivityChooserViewAdapter.MAX_ACTIVITY_COUNT_DEFAULT);

    Drawable expandActivityOverflowButtonDrawable = attributesArray.getDrawable(
            R.styleable.SherlockActivityChooserView_expandActivityOverflowButtonDrawable);

    attributesArray.recycle();

    LayoutInflater inflater = LayoutInflater.from(mContext);
    inflater.inflate(R.layout.abs__activity_chooser_view, this, true);

    mCallbacks = new Callbacks();

    mActivityChooserContent = (IcsLinearLayout) findViewById(R.id.abs__activity_chooser_view_content);
    mActivityChooserContentBackground = mActivityChooserContent.getBackground();

    mDefaultActivityButton = (FrameLayout) findViewById(R.id.abs__default_activity_button);
    mDefaultActivityButton.setOnClickListener(mCallbacks);
    mDefaultActivityButton.setOnLongClickListener(mCallbacks);
    mDefaultActivityButtonImage = (ImageView) mDefaultActivityButton.findViewById(R.id.abs__image);

    mExpandActivityOverflowButton = (FrameLayout) findViewById(R.id.abs__expand_activities_button);
    mExpandActivityOverflowButton.setOnClickListener(mCallbacks);
    mExpandActivityOverflowButtonImage =
            (ImageView) mExpandActivityOverflowButton.findViewById(R.id.abs__image);
    mExpandActivityOverflowButtonImage.setImageDrawable(expandActivityOverflowButtonDrawable);

    mAdapter = new ActivityChooserViewAdapter();
    mAdapter.registerDataSetObserver(new DataSetObserver() {
        @Override
        public void onChanged() {
            super.onChanged();
            updateAppearance();
        }
    });

    Resources resources = context.getResources();
    mListPopupMaxWidth = Math.max(resources.getDisplayMetrics().widthPixels / 2,
            resources.getDimensionPixelSize(R.dimen.abs__config_prefDialogWidth));
}
 
开发者ID:ivanovpv,项目名称:darksms,代码行数:56,代码来源:ActivityChooserView.java


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