本文整理了Java中android.widget.ListView.setHeaderDividersEnabled()
方法的一些代码示例,展示了ListView.setHeaderDividersEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ListView.setHeaderDividersEnabled()
方法的具体详情如下:
包路径:android.widget.ListView
类名称:ListView
方法名:setHeaderDividersEnabled
暂无
代码示例来源:origin: stackoverflow.com
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main) //need to set layout now that we are no longer using listactivity
ScoresDbAdapter.DatabaseHelper helper = new ScoresDbAdapter.DatabaseHelper(this);
database = helper.getWritableDatabase();
Cursor data = database.query("scores", fields, null, null, null, null, null);
dataSource = new SimpleCursorAdapter(this, R.layout.highscores, data, fields, new int[] { R.id.first, R.id.last });
ListView view = (ListView) findViewbyId(R.id.list_view) //findbyid instead of getListView()
view.setHeaderDividersEnabled(true);
view.addHeaderView(getLayoutInflater().inflate(R.layout.highscores, null));
view.setAdapter(dataSource); //set the adapter to the listView
}
代码示例来源:origin: mthli/Mount
private void setupListView() {
mListView = (ListView) findViewById(R.id.list);
mPackageList = new ArrayList<>();
mPackageAdapter = new PackageItemAdapter(this, mPackageList);
mListView.setAdapter(mPackageAdapter);
mListView.setHeaderDividersEnabled(false);
mListView.setOnScrollListener(this); // not show fast scroll always
mListView.setOnItemClickListener(this);
}
代码示例来源:origin: stackoverflow.com
ListView listView = getListView();
listView.setDivider(null);
listView.setDividerHeight(getResources().getDimensionPixelSize(R.dimen.divider_height));
listView.setHeaderDividersEnabled(true);
listView.setFooterDividersEnabled(true);
View padding = new View(getActivity());
listView.addHeaderView(padding);
listView.addFooterView(padding);
代码示例来源:origin: towavephone/MemoryCleaner
@Override public void initPreferenceListView(View view) {
ListView listView = (ListView) view.findViewById(android.R.id.list);
listView.setHorizontalScrollBarEnabled(false);
listView.setVerticalScrollBarEnabled(false);
listView.setDivider(
new ColorDrawable(getResources().getColor(R.color.grey)));
listView.setDividerHeight((int) getResources().getDimension(
R.dimen.preference_divider_height));
listView.setFooterDividersEnabled(false);
listView.setHeaderDividersEnabled(false);
}
代码示例来源:origin: ckcz123/PKUHelper-Android
@SuppressWarnings("unchecked")
@SuppressLint("InflateParams")
public NotificationSetting setPushes() {
subActivity.setContentView(R.layout.settings_pushes_listview);
subActivity.getActionBar().setTitle("推送设置");
View headerView = subActivity.getLayoutInflater().inflate(R.layout.settings_pushes_headerview, null);
listView = (ListView) subActivity.findViewById(R.id.settings_pushes_listview);
listView.addHeaderView(headerView);
listView.setHeaderDividersEnabled(false);
listView.setAdapter(new SimpleAdapter(subActivity, new ArrayList<HashMap<String, ?>>(),
R.layout.settings_pushes_item, new String[]{}, new int[]{}));
new RequestingTask(subActivity, "正在获取订阅的源列表",
Constants.domain + "/pkuhelper/nc/selectedSource.php?token=" + Constants.token,
Constants.REQUEST_SUBACTIVITY_PUSHES_GET).execute(new ArrayList<Parameters>());
return this;
}
代码示例来源:origin: ckcz123/PKUHelper-Android
@SuppressWarnings("unchecked")
@SuppressLint("InflateParams")
public Shows getShows() {
subActivity.getActionBar().setTitle("百讲演出");
subActivity.setContentView(R.layout.subactivity_listview);
subActivity.findViewById(R.id.subactivity_swipeRefreshLayout)
.setBackgroundColor(Color.parseColor("#feb772"));
listView = (ListView) subActivity.findViewById(R.id.subactivity_listview);
LayoutInflater layoutInflater = subActivity.getLayoutInflater();
View headerView = layoutInflater.inflate(R.layout.subactivity_listview_headerview, null);
ViewSetting.setImageResource(headerView, R.id.subactivity_listview_image, R.drawable.bjyc);
listView.addHeaderView(headerView);
listView.addFooterView(layoutInflater.inflate(R.layout.subactivity_listview_footerview, null));
listView.setHeaderDividersEnabled(false);
listView.setFooterDividersEnabled(false);
arrayList = new ArrayList<ShowInfo>();
listView.setAdapter(new SimpleAdapter(subActivity,
new ArrayList<HashMap<String, String>>(),
R.layout.subactivity_listview_item, new String[]{}, new int[]{}));
new RequestingTask(subActivity, "正在获取百讲演出信息...",
Constants.domain + "/pkuhelper/getshows.php", Constants.REQUEST_SUBACTIVITY_SHOWS)
.execute(new ArrayList<Parameters>());
return this;
}
代码示例来源:origin: ckcz123/PKUHelper-Android
@SuppressLint("InflateParams")
@SuppressWarnings("unchecked")
public Lecture showLecture() {
subActivity.setContentView(R.layout.subactivity_listview);
subActivity.getActionBar().setTitle("讲座预告");
subActivity.findViewById(R.id.subactivity_swipeRefreshLayout)
.setBackgroundColor(Color.parseColor("#34afd3"));
listView = (ListView) subActivity.findViewById(R.id.subactivity_listview);
LayoutInflater layoutInflater = subActivity.getLayoutInflater();
View headerView = layoutInflater.inflate(R.layout.subactivity_listview_headerview, null);
ViewSetting.setImageResource(headerView, R.id.subactivity_listview_image, R.drawable.jzyg);
listView.addHeaderView(headerView);
listView.addFooterView(layoutInflater.inflate(R.layout.subactivity_listview_footerview, null));
listView.setHeaderDividersEnabled(false);
listView.setFooterDividersEnabled(false);
listView.setAdapter(new SimpleAdapter(subActivity,
new ArrayList<HashMap<String, String>>(),
R.layout.subactivity_listview_item, new String[]{}, new int[]{}));
new RequestingTask(subActivity, "正在获取讲座信息...",
Constants.domain + "/services/pkuhelper/lectures.php",
Constants.REQUEST_SUBACTIVITY_LECTURE).execute(new ArrayList<Parameters>());
return this;
}
代码示例来源:origin: stackoverflow.com
listView.setPadding(10, 20, 10, 15);
listView.setFooterDividersEnabled(true);
listView.setHeaderDividersEnabled(true);
代码示例来源:origin: myxh/CoolShopping
mListView.setHeaderDividersEnabled(false);
int headerViewsCount = mListView.getHeaderViewsCount();
mGoodsListAdapter = new GoodsListAdapter(getActivity(),mGoodlist,headerViewsCount);
代码示例来源:origin: ckcz123/PKUHelper-Android
lists = new ArrayList<CertificationInfo>();
ArrayList<HashMap<String, String>> arrayList = new ArrayList<HashMap<String, String>>();
listView.setHeaderDividersEnabled(false);
listView.setFooterDividersEnabled(false);
listView.setAdapter(new SimpleAdapter(subActivity, arrayList,
代码示例来源:origin: andforce/iBeebo
listView.setAdapter(adapter);
adapter.notifyDataSetChanged();
listView.setHeaderDividersEnabled(false);
代码示例来源:origin: ckcz123/PKUHelper-Android
ListView listView = (ListView) subActivity.findViewById(R.id.settings_mypku_listview);
listView.addHeaderView(headerView);
listView.setHeaderDividersEnabled(false);
代码示例来源:origin: ckcz123/PKUHelper-Android
listView.addHeaderView(headerView);
listView.addFooterView(footerView);
listView.setHeaderDividersEnabled(false);
listView.setFooterDividersEnabled(false);
ArrayList<HashMap<String, String>> hashMaps = new ArrayList<HashMap<String, String>>();
代码示例来源:origin: andforce/iBeebo
mPullToRefreshListView.setHeaderDividersEnabled(false);
mPullToRefreshListView.setStackFromBottom(true);
代码示例来源:origin: andforce/iBeebo
listView.setAdapter(adapter);
adapter.notifyDataSetChanged();
listView.setHeaderDividersEnabled(false);
代码示例来源:origin: ckcz123/PKUHelper-Android
listView.addFooterView(footerView);
ViewSetting.setTextView(footerView, R.id.nc_setsource_hint_2, Html.fromHtml("<u>" + Constants.domain + "/pkuhelper/nc/post/</u>"));
listView.setHeaderDividersEnabled(false);
listView.setFooterDividersEnabled(false);
listView.setAdapter(new BaseAdapter() {
内容来源于网络,如有侵权,请联系作者删除!