本文整理汇总了Java中org.chromium.chrome.browser.widget.LoadingView类的典型用法代码示例。如果您正苦于以下问题:Java LoadingView类的具体用法?Java LoadingView怎么用?Java LoadingView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LoadingView类属于org.chromium.chrome.browser.widget包,在下文中一共展示了LoadingView类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onFinishInflate
import org.chromium.chrome.browser.widget.LoadingView; //导入依赖的package包/类
@Override
protected void onFinishInflate() {
super.onFinishInflate();
mItemsContainer = (BookmarkRecyclerView) findViewById(R.id.bookmark_items_container);
TextView emptyView = (TextView) findViewById(R.id.bookmark_empty_view);
emptyView.setText(R.string.bookmarks_folder_empty);
mItemsContainer.setEmptyView(emptyView);
mActionBar = (BookmarkActionBar) findViewById(R.id.bookmark_action_bar);
mLoadingView = (LoadingView) findViewById(R.id.bookmark_initial_loading_view);
FadingShadowView shadow = (FadingShadowView) findViewById(R.id.shadow);
if (DeviceFormFactor.isLargeTablet(getContext())) {
shadow.setVisibility(View.GONE);
} else {
shadow.init(ApiCompatibilityUtils.getColor(getResources(),
R.color.toolbar_shadow_color), FadingShadow.POSITION_TOP);
}
}
示例2: LogoView
import org.chromium.chrome.browser.widget.LoadingView; //导入依赖的package包/类
/**
* Constructor used to inflate a LogoView from XML.
*/
public LogoView(Context context, AttributeSet attrs) {
super(context, attrs);
mLogo = getDefaultLogo();
mLogoMatrix = new Matrix();
mLogoIsDefault = true;
mPaint = new Paint();
mPaint.setFilterBitmap(true);
// Mark this view as non-clickable so that accessibility will ignore it. When a non-default
// logo is shown, this view will be marked clickable again.
setOnClickListener(this);
setClickable(false);
setWillNotDraw(false);
mLoadingView = new LoadingView(getContext());
LayoutParams lp = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
lp.gravity = Gravity.CENTER;
mLoadingView.setLayoutParams(lp);
mLoadingView.setVisibility(View.GONE);
addView(mLoadingView);
}
示例3: onFinishInflate
import org.chromium.chrome.browser.widget.LoadingView; //导入依赖的package包/类
@Override
protected void onFinishInflate() {
super.onFinishInflate();
LayoutInflater.from(getContext()).inflate(R.layout.selectable_list_layout, this);
mEmptyView = (TextView) findViewById(R.id.empty_view);
mLoadingView = (LoadingView) findViewById(R.id.loading_view);
mLoadingView.showLoadingUI();
mToolbarStub = (ViewStub) findViewById(R.id.action_bar_stub);
FadingShadowView shadow = (FadingShadowView) findViewById(R.id.shadow);
if (DeviceFormFactor.isLargeTablet(getContext())) {
shadow.setVisibility(View.GONE);
} else {
shadow.init(ApiCompatibilityUtils.getColor(getResources(),
R.color.toolbar_shadow_color), FadingShadow.POSITION_TOP);
}
}
示例4: onFinishInflate
import org.chromium.chrome.browser.widget.LoadingView; //导入依赖的package包/类
@Override
protected void onFinishInflate() {
super.onFinishInflate();
LayoutInflater.from(getContext()).inflate(R.layout.selectable_list_layout, this);
// TODO(twellington): Remove this fork in the code after UX decides on final design
// for empty and loading views.
mChromeHomeEmptyAndLoadingViewTopPadding =
getResources().getDimensionPixelSize(R.dimen.chrome_home_empty_view_top_padding);
mEmptyView = (TextView) findViewById(R.id.empty_view);
setEmptyOrLoadingViewStyle(mEmptyView);
mLoadingView = (LoadingView) findViewById(R.id.loading_view);
setEmptyOrLoadingViewStyle(mLoadingView);
mLoadingView.showLoadingUI();
mToolbarStub = (ViewStub) findViewById(R.id.action_bar_stub);
setFocusable(true);
setFocusableInTouchMode(true);
}