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


Java GridView.setVerticalScrollBarEnabled方法代码示例

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


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

示例1: getViewPagerItem

import android.widget.GridView; //导入方法依赖的package包/类
private GridView getViewPagerItem(final int index) {
    GridView gridView = new GridView(_context);
    gridView.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT,
            LayoutParams.WRAP_CONTENT));
    gridView.setNumColumns(4);
    gridView.setVerticalScrollBarEnabled(false);
    gridView.setHorizontalScrollBarEnabled(false);
    gridView.setPadding(8, 8, 8, 0);
    gridView.setVerticalSpacing(20);
    gridView.setSelector(new ColorDrawable(Color.TRANSPARENT));

    gridView.setAdapter(new YayaEmoGridViewAdapter(_context,
            getGridViewData(index)));
    gridView.setOnItemClickListener(new OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> parent, View view,
                int position, long id) {
            int start = index * SysConstant.yayaPageSize;
            onEmoGridViewItemClick.onItemClick(position + start, index);
        }
    });
    return gridView;
}
 
开发者ID:ccfish86,项目名称:sctalk,代码行数:24,代码来源:YayaEmoGridView.java

示例2: getViewPagerItem

import android.widget.GridView; //导入方法依赖的package包/类
private GridView getViewPagerItem(final int index) {
    GridView gridView = new GridView(_context);
    gridView.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT,
            LayoutParams.WRAP_CONTENT));
    gridView.setNumColumns(7);
    gridView.setVerticalScrollBarEnabled(false);
    gridView.setHorizontalScrollBarEnabled(false);
    gridView.setPadding(8, 8, 8, 0);
    gridView.setVerticalSpacing(CommonUtil.getElementSzie(_context) / 2
            + CommonUtil.getElementSzie(_context) / 3);
    // gridView.setVerticalSpacing(30);
    gridView.setBackgroundColor(Color.TRANSPARENT);
    gridView.setAdapter(new EmoGridViewAdapter(_context,
            getGridViewData(index)));
    gridView.setOnItemClickListener(new OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> parent, View view,
                int position, long id) {
            int start = index * (SysConstant.pageSize - 1);
            onEmoGridViewItemClick.onItemClick(position + start, index);
        }
    });
    return gridView;
}
 
开发者ID:ccfish86,项目名称:sctalk,代码行数:25,代码来源:EmoGridView.java

示例3: EmoticonPageView

import android.widget.GridView; //导入方法依赖的package包/类
public EmoticonPageView(Context context, AttributeSet attrs) {
    super(context, attrs);
    LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View view = inflater.inflate(R.layout.item_emoticonpage, this);
    mGvEmotion = (GridView) view.findViewById(R.id.gv_emotion);

    if (Build.VERSION.SDK_INT > Build.VERSION_CODES.HONEYCOMB) {
        mGvEmotion.setMotionEventSplittingEnabled(false);
    }
    mGvEmotion.setStretchMode(GridView.STRETCH_COLUMN_WIDTH);
    mGvEmotion.setCacheColorHint(0);
    mGvEmotion.setSelector(new ColorDrawable(Color.TRANSPARENT));
    mGvEmotion.setVerticalScrollBarEnabled(false);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:15,代码来源:EmoticonPageView.java

示例4: EmoticonPageView

import android.widget.GridView; //导入方法依赖的package包/类
public EmoticonPageView(Context context, AttributeSet attrs) {
    super(context, attrs);
    LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View view = inflater.inflate(R.layout.kf5_emoticon_page, this);
    mGvEmotion = (GridView) view.findViewById(R.id.kf5_grid_view_emotion);

    if (Build.VERSION.SDK_INT > Build.VERSION_CODES.HONEYCOMB) {
        mGvEmotion.setMotionEventSplittingEnabled(false);
    }
    mGvEmotion.setStretchMode(GridView.STRETCH_COLUMN_WIDTH);
    mGvEmotion.setCacheColorHint(0);
    mGvEmotion.setSelector(new ColorDrawable(Color.TRANSPARENT));
    mGvEmotion.setVerticalScrollBarEnabled(false);
}
 
开发者ID:Zyj163,项目名称:yyox,代码行数:15,代码来源:EmoticonPageView.java

示例5: EmoticonPageView

import android.widget.GridView; //导入方法依赖的package包/类
public EmoticonPageView(Context context, AttributeSet attrs) {
    super(context, attrs);
    LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View view = inflater.inflate(ResourceUtils.getIdByName(context,"layout","sobot_item_emoticonpage"), this);
    mGvEmotion = (GridView) view.findViewById(ResourceUtils.getIdByName(context,"id", "sobot_gv_emotion"));

    if (Build.VERSION.SDK_INT > Build.VERSION_CODES.HONEYCOMB) {
        mGvEmotion.setMotionEventSplittingEnabled(false);
    }
    mGvEmotion.setStretchMode(GridView.STRETCH_COLUMN_WIDTH);
    mGvEmotion.setCacheColorHint(0);
    mGvEmotion.setSelector(new ColorDrawable(Color.TRANSPARENT));
    mGvEmotion.setVerticalScrollBarEnabled(false);
}
 
开发者ID:fengdongfei,项目名称:CXJPadProject,代码行数:15,代码来源:EmoticonPageView.java


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