Java Code Examples for org.chromium.chrome.browser.widget.FadingShadowView#setVisibility()

The following examples show how to use org.chromium.chrome.browser.widget.FadingShadowView#setVisibility() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BookmarkContentView.java    From delion with Apache License 2.0 6 votes vote down vote up
@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);
    }
}
 
Example 2
Source File: DownloadManagerUi.java    From delion with Apache License 2.0 6 votes vote down vote up
/**
 * Initializes the UI for the given Activity.
 *
 * @param activity Activity that is showing the UI.
 */
public void initialize(DownloadManagerUiDelegate delegate, Activity activity) {
    mDelegate = delegate;

    mActionBarDrawerToggle = new ActionBarDrawerToggle(activity,
            this, (Toolbar) findViewById(R.id.action_bar),
            R.string.accessibility_bookmark_drawer_toggle_btn_open,
            R.string.accessibility_bookmark_drawer_toggle_btn_close);
    addDrawerListener(mActionBarDrawerToggle);
    mActionBarDrawerToggle.syncState();

    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);
    }

    mSpaceDisplay.update(0);

    ((Toolbar) findViewById(R.id.action_bar)).setTitle(R.string.menu_downloads);
}
 
Example 3
Source File: BookmarkContentView.java    From AndroidChromium with Apache License 2.0 6 votes vote down vote up
@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);
    }
}
 
Example 4
Source File: SelectableListLayout.java    From AndroidChromium with Apache License 2.0 6 votes vote down vote up
@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);
    }
}