本文整理匯總了Java中android.support.v17.leanback.app.BrowseFragment.setOnItemViewClickedListener方法的典型用法代碼示例。如果您正苦於以下問題:Java BrowseFragment.setOnItemViewClickedListener方法的具體用法?Java BrowseFragment.setOnItemViewClickedListener怎麽用?Java BrowseFragment.setOnItemViewClickedListener使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.support.v17.leanback.app.BrowseFragment
的用法示例。
在下文中一共展示了BrowseFragment.setOnItemViewClickedListener方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onCreate
import android.support.v17.leanback.app.BrowseFragment; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_manageaccounts);
mLibrary = Library.getInstance();
mLibrary.registerListener(this);
mFitnessLibrary = FitnessLibrary.getInstance();
mFitnessLibrary.registerListener(this);
mFragmentManager = getFragmentManager();
mBrowseFragment = (BrowseFragment) mFragmentManager.findFragmentById(R.id.id_Fragment_ManageAccountActivity);
mBrowseFragment.setHeadersState(BrowseFragment.HEADERS_ENABLED);
mBrowseFragment.setBadgeDrawable(getDrawable(R.drawable.browse_logo));
mBrowseFragment.setOnItemViewClickedListener(this);
BackgroundManager backgroundManager = BackgroundManager.getInstance(this);
backgroundManager.attach(this.getWindow());
backgroundManager.setDrawable(getResources().getDrawable(R.drawable.background, null));
mArrayObjectAdapter = new ArrayObjectAdapter(new ListRowPresenter());
mBrowseFragment.setAdapter(mArrayObjectAdapter);
updateUI();
}
示例2: onCreate
import android.support.v17.leanback.app.BrowseFragment; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (mMediaLibrary.getMediaItems().isEmpty()) {
if (mSettings.getBoolean(PreferencesActivity.AUTO_RESCAN, true))
mMediaLibrary.scanMediaItems(false);
else
mMediaLibrary.loadMedaItems();
}
if (!VLCInstance.testCompatibleCPU(this)) {
finish();
return;
}
mContext = this;
setContentView(R.layout.tv_main_fragment);
mDefaultBackground = getResources().getDrawable(R.drawable.background);
final FragmentManager fragmentManager = getFragmentManager();
mBrowseFragment = (BrowseFragment) fragmentManager.findFragmentById(
R.id.browse_fragment);
mProgressBar = (ProgressBar) findViewById(R.id.tv_main_progress);
// Set display parameters for the BrowseFragment
mBrowseFragment.setHeadersState(BrowseFragment.HEADERS_ENABLED);
mBrowseFragment.setTitle(getString(R.string.app_name));
mBrowseFragment.setBadgeDrawable(getResources().getDrawable(R.drawable.icon));
// add a listener for selected items
mBrowseFragment.setOnItemViewClickedListener(this);
mBrowseFragment.setOnItemViewSelectedListener(this);
if (!Build.MANUFACTURER.equalsIgnoreCase("amazon")) { //Hide search for Amazon Fire TVs
mBrowseFragment.setOnSearchClickedListener(this);
// set search icon color
mBrowseFragment.setSearchAffordanceColor(getResources().getColor(R.color.orange500));
}
mRootContainer = mBrowseFragment.getView();
}
示例3: onCreate
import android.support.v17.leanback.app.BrowseFragment; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mMediaLibrary.loadMediaItems(false);
if (!VLCInstance.testCompatibleCPU(this)) {
finish();
return;
}
mContext = this;
setContentView(R.layout.tv_main_fragment);
mDefaultBackground = getResources().getDrawable(R.drawable.background);
final FragmentManager fragmentManager = getFragmentManager();
mBrowseFragment = (BrowseFragment) fragmentManager.findFragmentById(
R.id.browse_fragment);
mProgressBar = (ProgressBar) findViewById(R.id.tv_main_progress);
// Set display parameters for the BrowseFragment
mBrowseFragment.setHeadersState(BrowseFragment.HEADERS_ENABLED);
mBrowseFragment.setTitle(getString(R.string.app_name));
mBrowseFragment.setBadgeDrawable(getResources().getDrawable(R.drawable.icon));
// add a listener for selected items
mBrowseFragment.setOnItemViewClickedListener(this);
mBrowseFragment.setOnItemViewSelectedListener(this);
if (!Build.MANUFACTURER.equalsIgnoreCase("amazon")) { //Hide search for Amazon Fire TVs
mBrowseFragment.setOnSearchClickedListener(this);
// set search icon color
mBrowseFragment.setSearchAffordanceColor(getResources().getColor(R.color.orange500));
}
mRootContainer = mBrowseFragment.getView();
}
示例4: onCreate
import android.support.v17.leanback.app.BrowseFragment; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tvmain);
mFragmentManager = getFragmentManager();
mBrowseFragment = (BrowseFragment) mFragmentManager.findFragmentById(R.id.id_frag_TVMainActivity);
mBrowseFragment.setHeadersState(BrowseFragment.HEADERS_ENABLED);
mBrowseFragment.setBadgeDrawable(getDrawable(R.drawable.browse_logo));
mBrowseFragment.setOnItemViewClickedListener(this);
BackgroundManager backgroundManager = BackgroundManager.getInstance(this);
backgroundManager.attach(this.getWindow());
backgroundManager.setDrawable(getResources().getDrawable(R.drawable.background, null));
mArrayObjectAdapter = new ArrayObjectAdapter(new ListRowPresenter());
mBrowseFragment.setAdapter(mArrayObjectAdapter);
mLibrary = Library.getInstance();
mLibrary.init(this);
mFitnessLibrary = FitnessLibrary.getInstance();
mFitnessLibrary.init(this);
updateUI();
}