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