本文整理了Java中android.widget.ListView.setFadingEdgeLength()
方法的一些代码示例,展示了ListView.setFadingEdgeLength()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ListView.setFadingEdgeLength()
方法的具体详情如下:
包路径:android.widget.ListView
类名称:ListView
方法名:setFadingEdgeLength
暂无
代码示例来源:origin: H07000223/FlycoTabLayout
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ListView lv = new ListView(mContext);
lv.setCacheColorHint(Color.TRANSPARENT);
lv.setFadingEdgeLength(0);
lv.setAdapter(new SimpleHomeAdapter(mContext, mItems));
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Intent intent = new Intent(mContext, mClasses[position]);
startActivity(intent);
}
});
setContentView(lv);
}
}
代码示例来源:origin: H07000223/FlycoDialog_Master
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mDisplayMetrics = getResources().getDisplayMetrics();
ListView lv = new ListView(mContext);
lv.setCacheColorHint(Color.TRANSPARENT);
lv.setBackgroundColor(Color.WHITE);
lv.setFadingEdgeLength(0);
lv.setAdapter(new SimpleHomeAdapter());
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Intent intent = new Intent(mContext, mClazzs[position]);
startActivity(intent);
}
});
setContentView(lv);
}
代码示例来源:origin: H07000223/FlycoDialog_Master
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mDisplayMetrics = getResources().getDisplayMetrics();
ListView lv = new ListView(mContext);
lv.setCacheColorHint(Color.TRANSPARENT);
lv.setBackgroundColor(Color.WHITE);
lv.setFadingEdgeLength(0);
lv.setAdapter(new SimpleHomeAdapter());
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Intent intent = new Intent(mContext, mClazzs[position]);
startActivity(intent);
}
});
setContentView(lv);
}
代码示例来源:origin: H07000223/FlycoDialog_Master
@Override
public View onCreateView() {
LinearLayout ll_container = new LinearLayout(mContext);
ll_container.setOrientation(LinearLayout.VERTICAL);
/** title */
mTvTitle = new TextView(mContext);
mTvTitle.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT));
mTvTitle.setSingleLine(true);
mTvTitle.setPadding(dp2px(18), dp2px(10), 0, dp2px(10));
ll_container.addView(mTvTitle);
/** listview */
mLv = new ListView(mContext);
mLv.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT));
mLv.setCacheColorHint(Color.TRANSPARENT);
mLv.setFadingEdgeLength(0);
mLv.setVerticalScrollBarEnabled(false);
mLv.setSelector(new ColorDrawable(Color.TRANSPARENT));
ll_container.addView(mLv);
return ll_container;
}
代码示例来源:origin: H07000223/FlycoDialog_Master
mLv.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT, 1));
mLv.setCacheColorHint(Color.TRANSPARENT);
mLv.setFadingEdgeLength(0);
mLv.setVerticalScrollBarEnabled(false);
mLv.setSelector(new ColorDrawable(Color.TRANSPARENT));
代码示例来源:origin: H07000223/FlycoPageIndicator
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ListView lv = new ListView(context);
lv.setCacheColorHint(Color.TRANSPARENT);
lv.setFadingEdgeLength(0);
lv.setAdapter(new SimpleHomeAdapter(context, items));
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Intent intent = new Intent(context, classes[position]);
startActivity(intent);
}
});
setContentView(lv);
}
}
代码示例来源:origin: Yuphee/RecordVideo
mLv.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT, 1));
mLv.setCacheColorHint(Color.TRANSPARENT);
mLv.setFadingEdgeLength(0);
mLv.setVerticalScrollBarEnabled(false);
mLv.setSelector(new ColorDrawable(Color.TRANSPARENT));
代码示例来源:origin: smuyyh/SprintNBA
@Override
public View onCreateView() {
LinearLayout ll_container = new LinearLayout(mContext);
ll_container.setOrientation(LinearLayout.VERTICAL);
/** title */
mTvTitle = new TextView(mContext);
mTvTitle.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT));
mTvTitle.setSingleLine(true);
mTvTitle.setPadding(dp2px(18), dp2px(10), 0, dp2px(10));
ll_container.addView(mTvTitle);
/** listview */
mLv = new ListView(mContext);
mLv.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT));
mLv.setCacheColorHint(Color.TRANSPARENT);
mLv.setFadingEdgeLength(0);
mLv.setVerticalScrollBarEnabled(false);
mLv.setSelector(new ColorDrawable(Color.TRANSPARENT));
ll_container.addView(mLv);
return ll_container;
}
代码示例来源:origin: smuyyh/SprintNBA
mLv.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT, 1));
mLv.setCacheColorHint(Color.TRANSPARENT);
mLv.setFadingEdgeLength(0);
mLv.setVerticalScrollBarEnabled(false);
mLv.setSelector(new ColorDrawable(Color.TRANSPARENT));
代码示例来源:origin: stackoverflow.com
private void setupListViewAdapter(ListView listView, View headerView, View footerView){
listView.setDividerHeight(5);
listView.setFadingEdgeLength(200);
listView.addHeaderView(headerView, null, false);//--> here is another assignment
listView.addFooterView(footerView, null, false);//--> here is another assignment
listView.setScrollingCacheEnabled(false);
listView.requestFocus(0);
listView.setAdapter(mDataAdapter);
}
代码示例来源:origin: behindeye/WxPhoneNumberHelper
private void init(final Context context, String title, String[] items, int selectedIndex) {
listView = new ListView(context);
listView.setFadingEdgeLength(0);
listView.setOverScrollMode(View.OVER_SCROLL_NEVER);
listView.setCacheColorHint(Color.TRANSPARENT);
代码示例来源:origin: derry/delion
mPopup.getListView().setFadingEdgeLength(mVerticalFadeDistance);
内容来源于网络,如有侵权,请联系作者删除!