當前位置: 首頁>>代碼示例>>Java>>正文


Java BackgroundManager.setColor方法代碼示例

本文整理匯總了Java中android.support.v17.leanback.app.BackgroundManager.setColor方法的典型用法代碼示例。如果您正苦於以下問題:Java BackgroundManager.setColor方法的具體用法?Java BackgroundManager.setColor怎麽用?Java BackgroundManager.setColor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.support.v17.leanback.app.BackgroundManager的用法示例。


在下文中一共展示了BackgroundManager.setColor方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onCreate

import android.support.v17.leanback.app.BackgroundManager; //導入方法依賴的package包/類
@Override
public void onCreate(Bundle savedInstanceState) {
    Log.d(TAG, "onCreate " + savedInstanceState);
    super.onCreate(savedInstanceState);

    mPrefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
    mDisplayMode = readDisplayModePref(mPrefs);

    BackgroundManager bgMngr = BackgroundManager.getInstance(getActivity());
    if(!bgMngr.isAttached())
        bgMngr.attach(getActivity().getWindow());
    bgMngr.setColor(getResources().getColor(R.color.leanback_background));

    setTitle(getArguments().getString(ARG_TITLE));
    mUri = getArguments().getParcelable(ARG_URI);
    mIsRoot = getArguments().getBoolean(ARG_IS_ROOT, false);

    setupEventListeners();

    // NOTE: onCreate is called only when the fragment is first created, not when it is back from backstack
    initGridOrList();

    mRefreshOnNextResume = true;
}
 
開發者ID:archos-sa,項目名稱:aos-Video,代碼行數:25,代碼來源:ListingFragment.java

示例2: onCreate

import android.support.v17.leanback.app.BackgroundManager; //導入方法依賴的package包/類
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    BackgroundManager bgMngr = BackgroundManager.getInstance(getActivity());
    bgMngr.attach(getActivity().getWindow());
    bgMngr.setColor(getResources().getColor(R.color.leanback_background));

    mShortcut = (Shortcut)getActivity().getIntent().getSerializableExtra(EXTRA_SHORTCUT);

    DetailsOverviewRow detailRow = new DetailsOverviewRow(mShortcut);
    detailRow.setImageScaleUpAllowed(false);
    addActions(detailRow);
    mDetailsRowPresenter = new FullWidthDetailsOverviewRowPresenter(new ShortcutDetailsPresenter());

    mDetailsRowPresenter.setBackgroundColor(getResources().getColor(R.color.lightblue900));
    mDetailsRowPresenter.setOnActionClickedListener(this);

    ArrayObjectAdapter adapter = new ArrayObjectAdapter(mDetailsRowPresenter);
    adapter.add(detailRow);
    setAdapter(adapter);
}
 
開發者ID:archos-sa,項目名稱:aos-Video,代碼行數:23,代碼來源:NetworkShortcutDetailsFragment.java

示例3: onActivityCreated

import android.support.v17.leanback.app.BackgroundManager; //導入方法依賴的package包/類
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    BackgroundManager bgMngr = BackgroundManager.getInstance(getActivity());
    bgMngr.attach(getActivity().getWindow());
    bgMngr.setColor(getResources().getColor(R.color.leanback_background));

    setTitle(getString(R.string.network_storage));
    setHeadersState(HEADERS_DISABLED);
    setHeadersTransitionOnBackEnabled(false);

    loadRows();

    // Launch the shortcuts loading async task
    mShortcutsLoaderTask = new ShortcutsLoaderTask();
    mShortcutsLoaderTask.execute();
    mFtpShortcutsLoaderTask = new FtpShortcutsLoaderTask(); //not in the same task because this isn't using the same cursor
    mFtpShortcutsLoaderTask.execute();
}
 
開發者ID:archos-sa,項目名稱:aos-Video,代碼行數:21,代碼來源:NetworkRootFragment.java

示例4: onCreate

import android.support.v17.leanback.app.BackgroundManager; //導入方法依賴的package包/類
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    mPrefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
    int displayModeIndex = mPrefs.getInt(PREF_ALL_MOVIES_DISPLAY_MODE, -1);
    if (displayModeIndex<0) {
        mDisplayMode = DisplayMode.GRID; // default
    } else {
        mDisplayMode = DisplayMode.values()[displayModeIndex];
    }
    mSortOrder = mPrefs.getString(SORT_PARAM_KEY, MoviesLoader.DEFAULT_SORT);
    mSortOrderEntries = MoviesSortOrderEntry.getSortOrderEntries(getActivity(), sortOrderIndexer);

    BackgroundManager bgMngr = BackgroundManager.getInstance(getActivity());
    bgMngr.attach(getActivity().getWindow());
    bgMngr.setColor(getResources().getColor(R.color.leanback_background));

    setTitle(getString(R.string.all_movies));
    setEmptyTextMessage(getString(R.string.you_have_no_movies));
    setOnItemViewClickedListener(new VideoViewClickedListener(getActivity()));
    setOnItemViewSelectedListener(new ItemViewSelectedListener());

    initGridOrList();
}
 
開發者ID:archos-sa,項目名稱:aos-Video,代碼行數:26,代碼來源:AllMoviesGridFragment.java

示例5: onCreate

import android.support.v17.leanback.app.BackgroundManager; //導入方法依賴的package包/類
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    mPrefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
    int displayModeIndex = mPrefs.getInt(PREF_NON_SCRAPED_VIDEOS_DISPLAY_MODE, -1);
    if (displayModeIndex < 0) {
        mDisplayMode = DisplayMode.GRID; // default
    } else {
        mDisplayMode = DisplayMode.values()[displayModeIndex];
    }
    mSortOrder = mPrefs.getString(SORT_PARAM_KEY, NonScrapedVideosLoader.DEFAULT_SORT);
    mSortOrderEntries = NonScrapedSortOrderEntry.getSortOrderEntries(getActivity(), sortOrderIndexer);

    BackgroundManager bgMngr = BackgroundManager.getInstance(getActivity());
    bgMngr.attach(getActivity().getWindow());
    bgMngr.setColor(getResources().getColor(R.color.leanback_background));

    setTitle(getString(R.string.non_scraped_videos));
    setEmptyTextMessage(getString(R.string.you_have_no_non_scraped_videos));
    setOnItemViewClickedListener(new VideoViewClickedListener(getActivity()));
    setOnItemViewSelectedListener(new ItemViewSelectedListener());

    initGridOrList();
}
 
開發者ID:archos-sa,項目名稱:aos-Video,代碼行數:26,代碼來源:NonScrapedVideosFragment.java

示例6: onActivityCreated

import android.support.v17.leanback.app.BackgroundManager; //導入方法依賴的package包/類
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    Resources r = getResources();
    BackgroundManager bgMngr = BackgroundManager.getInstance(getActivity());
    bgMngr.attach(getActivity().getWindow());
    bgMngr.setColor(r.getColor(R.color.leanback_background));
    mNfoTask = new NfoTask();
    mNfoTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
 
開發者ID:archos-sa,項目名稱:aos-Video,代碼行數:12,代碼來源:ManualScrappingSearchFragment.java

示例7: onActivityCreated

import android.support.v17.leanback.app.BackgroundManager; //導入方法依賴的package包/類
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    mPrefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
    mSortOrder = mPrefs.getString(getSortOrderParamKey(), MoviesLoader.DEFAULT_SORT);

    Resources r = getResources();
    BackgroundManager bgMngr = BackgroundManager.getInstance(getActivity());
    bgMngr.attach(getActivity().getWindow());
    bgMngr.setColor(r.getColor(R.color.leanback_background));

    setHeadersState(HEADERS_ENABLED);
    setHeadersTransitionOnBackEnabled(true);

    // set fastLane (or headers) background color
    setBrandColor(r.getColor(R.color.leanback_side));

    // set search icon color
    setSearchAffordanceColor(r.getColor(R.color.lightblueA200));

    setupEventListeners();

    RowPresenter rowPresenter = new ListRowPresenter();
    rowPresenter.setHeaderPresenter(new RowHeaderPresenter());
    mRowsAdapter = new ArrayObjectAdapter(rowPresenter);
    setAdapter(mRowsAdapter);

    mVideoPresenter = new PosterImageCardPresenter(getActivity());
    mVideoMapper = new CompatibleCursorMapperConverter(new VideoCursorMapper());

    getLoaderManager().initLoader(-1, null, this);
}
 
開發者ID:archos-sa,項目名稱:aos-Video,代碼行數:34,代碼來源:MoviesByFragment.java

示例8: onActivityCreated

import android.support.v17.leanback.app.BackgroundManager; //導入方法依賴的package包/類
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    Resources r = getResources();
    BackgroundManager bgMngr = BackgroundManager.getInstance(getActivity());
    bgMngr.attach(getActivity().getWindow());
    bgMngr.setColor(r.getColor(R.color.leanback_background));
}
 
開發者ID:archos-sa,項目名稱:aos-Video,代碼行數:10,代碼來源:VideoSearchFragment.java


注:本文中的android.support.v17.leanback.app.BackgroundManager.setColor方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。