本文整理了Java中android.support.v4.widget.SwipeRefreshLayout.addView()
方法的一些代码示例,展示了SwipeRefreshLayout.addView()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SwipeRefreshLayout.addView()
方法的具体详情如下:
包路径:android.support.v4.widget.SwipeRefreshLayout
类名称:SwipeRefreshLayout
方法名:addView
暂无
代码示例来源:origin: TheFinestArtist/FinestWebView-Android
@Override
public void addView(View child) {
super.addView(child);
if (child instanceof WebView) {
this.webView = (WebView) child;
}
}
代码示例来源:origin: TheFinestArtist/FinestWebView-Android
swipeRefreshLayout.addView(webView);
swipeRefreshLayout.removeViewAt(1);
代码示例来源:origin: ISchwarz23/SortableTableView
private void setupTableDataView(final AttributeSet attributes, final int styleAttributes) {
final LayoutParams dataViewLayoutParams = new LayoutParams(getWidthAttribute(attributes), LayoutParams.MATCH_PARENT);
if (isInEditMode()) {
tableDataAdapter = new EditModeTableDataAdapter(getContext());
} else {
tableDataAdapter = new DefaultTableDataAdapter(getContext());
}
tableDataAdapter.setRowBackgroundProvider(dataRowBackgroundProvider);
tableDataView = new ListView(getContext(), attributes, styleAttributes);
tableDataView.setOnItemClickListener(new InternalDataClickListener());
tableDataView.setOnItemLongClickListener(new InternalDataLongClickListener());
tableDataView.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
tableDataView.setAdapter(tableDataAdapter);
tableDataView.setId(R.id.table_data_view);
tableDataView.setOnScrollListener(new InternalOnScrollListener());
swipeRefreshLayout = new SwipeRefreshLayout(getContext());
swipeRefreshLayout.setLayoutParams(dataViewLayoutParams);
swipeRefreshLayout.addView(tableDataView);
swipeRefreshLayout.setColorSchemeColors(headerColor);
swipeRefreshLayout.setEnabled(false);
addView(swipeRefreshLayout);
}
代码示例来源:origin: googlesamples/android-SwipeRefreshListFragment
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Create the list fragment's content view by calling the super method
final View listFragmentView = super.onCreateView(inflater, container, savedInstanceState);
// Now create a SwipeRefreshLayout to wrap the fragment's content view
mSwipeRefreshLayout = new ListFragmentSwipeRefreshLayout(container.getContext());
// Add the list fragment's content view to the SwipeRefreshLayout, making sure that it fills
// the SwipeRefreshLayout
mSwipeRefreshLayout.addView(listFragmentView,
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
// Make sure that the SwipeRefreshLayout will fill the fragment
mSwipeRefreshLayout.setLayoutParams(
new ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT));
// Now return the SwipeRefreshLayout as this fragment's content view
return mSwipeRefreshLayout;
}
代码示例来源:origin: Wilm0r/giggity
refresher.addView(list);
代码示例来源:origin: xfshipan/miappstore
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
if (swipeRefreshLayout == null) {
swipeRefreshLayout = new SwipeRefreshLayout(getContext());
loadPage = new LoadPage(getActivity()) {
@Override
protected LoadResult loadServer() {
return BaseViewPagerFragment.this.loadData();
}
@Override
protected View createSuccessView() {
return BaseViewPagerFragment.this.createSuccessView();
}
};
swipeRefreshLayout.addView(loadPage);
} else {
//如果loadPage不为空,首先移除之前loadPage之前的父控件
example.xfsp.miappstore.utils.ViewUtils.removeParent(swipeRefreshLayout);
}
swipeRefreshLayout.setColorSchemeResources(android.R.color.holo_blue_bright,
android.R.color.holo_green_light,
android.R.color.holo_orange_light,
android.R.color.holo_red_light);
return swipeRefreshLayout;
}
代码示例来源:origin: JustinRoom/JSCKit
swipeRefreshLayout.addView(contentContainer, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
代码示例来源:origin: kingargyle/adt-leanback-support
private void createProgressView() {
mCircleView = new CircleImageView(getContext(), CIRCLE_BG_LIGHT, CIRCLE_DIAMETER/2);
mProgress = new MaterialProgressDrawable(getContext(), this);
mProgress.setBackgroundColor(CIRCLE_BG_LIGHT);
mCircleView.setImageDrawable(mProgress);
mCircleView.setVisibility(View.GONE);
addView(mCircleView);
}
代码示例来源:origin: z3896823/PanelList
swipeRefreshLayout = new SwipeRefreshLayout(context);
swipeRefreshLayout.addView(mhsv_content, lp_mhsv_content);
swipeRefreshLayout.setOnRefreshListener(onRefreshListener);
Log.d(TAG, "reorganizeViewGroup: " + onRefreshListener.toString());
内容来源于网络,如有侵权,请联系作者删除!