本文整理了Java中android.widget.ListView.setScrollBarStyle()
方法的一些代码示例,展示了ListView.setScrollBarStyle()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ListView.setScrollBarStyle()
方法的具体详情如下:
包路径:android.widget.ListView
类名称:ListView
方法名:setScrollBarStyle
暂无
代码示例来源:origin: k9mail/k-9
private void initializeLayout() {
listView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
listView.setLongClickable(true);
listView.setFastScrollEnabled(true);
listView.setScrollingCacheEnabled(false);
listView.setOnItemClickListener(this);
registerForContextMenu(listView);
}
代码示例来源:origin: k9mail/k-9
actionBarProgressView = getActionBarProgressView();
listView = getListView();
listView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
listView.setFastScrollEnabled(true);
listView.setScrollingCacheEnabled(false);
代码示例来源:origin: SMSTicket/sms-ticket
@Override
public void onCreate(Bundle b) {
super.onCreate(b);
if (b != null) {
xmlId = b.getInt("xml");
}
mPreferenceManager = onCreatePreferenceManager();
lv = (ListView)LayoutInflater.from(getActivity()).inflate(R.layout.preference_list_content, null);
lv.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
if (xmlId > 0) {
addPreferencesFromResource(xmlId);
}
}
代码示例来源:origin: stackoverflow.com
ListView choicelist = new ListView(this);
choicelist.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
choicelist.setAdapter(new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_single_choice,
android.R.id.text1, your_answer_list));
choicelist.setSelector(new ColorDrawable(0x0));
choicelist.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
choicelist.setCacheColorHint(0);
choicelist.setVerticalFadingEdgeEnabled(false);
代码示例来源:origin: stackoverflow.com
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(android.R.layout.list_content, container, false);
ListView listView = (ListView) view.findViewById(android.R.id.list);
listView.setScrollBarSize(0);
listView.setScrollbarFadingEnabled(true);
listView.setHorizontalScrollBarEnabled(false);
listView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
listView.setVerticalScrollBarEnabled(false);
listView.setHorizontalScrollBarEnabled(false);
return view;
}
代码示例来源:origin: infinum/android_dbinspector
@Override
public void onCreate(Bundle b) {
super.onCreate(b);
if (getArguments() != null) {
xmlId = getArguments().getInt(XML_ID);
}
mPreferenceManager = onCreatePreferenceManager();
lv = (ListView) LayoutInflater.from(getActivity()).inflate(R.layout.dbinspector_preference_list_content, null);
lv.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
addPreferencesFromResource(xmlId);
postBindPreferences();
}
代码示例来源:origin: geniusgithub/AndroidDialer
private static void addPaddingToView(ListView listView, int parentWidth,
int listSpaceWeight, int listViewWeight)
{
if (listSpaceWeight > 0 && listViewWeight > 0) {
double paddingPercent = (double) listSpaceWeight / (double)
(listSpaceWeight * 2 + listViewWeight);
listView.setPadding(
(int) (parentWidth * paddingPercent * TEXT_LEFT_PADDING_TO_CARD_PADDING_RATIO),
listView.getPaddingTop(),
(int) (parentWidth * paddingPercent * TEXT_LEFT_PADDING_TO_CARD_PADDING_RATIO),
listView.getPaddingBottom());
// The EdgeEffect and ScrollBar need to span to the edge of the ListView's padding.
listView.setClipToPadding(false);
listView.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY);
}
}
代码示例来源:origin: geniusgithub/AndroidDialer
private void configureVerticalScrollbar() {
boolean hasScrollbar = isVisibleScrollbarEnabled() && isSectionHeaderDisplayEnabled();
if (mListView != null) {
mListView.setFastScrollEnabled(hasScrollbar);
mListView.setFastScrollAlwaysVisible(hasScrollbar);
mListView.setVerticalScrollbarPosition(mVerticalScrollbarPosition);
mListView.setScrollBarStyle(ListView.SCROLLBARS_OUTSIDE_OVERLAY);
}
}
代码示例来源:origin: nvllsvm/Audinaut
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
getListView().setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
if (mHavePrefs) {
bindPreferences();
}
mInitDone = true;
if (savedInstanceState != null) {
Bundle localBundle = savedInstanceState.getBundle(PREFERENCES_TAG);
if (localBundle != null) {
PreferenceScreen screen = getPreferenceScreen();
if (screen != null) {
screen.restoreHierarchyState(localBundle);
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!