本文整理汇总了Java中com.google.samples.apps.iosched.util.SessionsHelper类的典型用法代码示例。如果您正苦于以下问题:Java SessionsHelper类的具体用法?Java SessionsHelper怎么用?Java SessionsHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SessionsHelper类属于com.google.samples.apps.iosched.util包,在下文中一共展示了SessionsHelper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setUpModel
import com.google.samples.apps.iosched.util.SessionsHelper; //导入依赖的package包/类
@Before
public void setUpModel() {
// Create a fake model to simulate a keynote session.
SessionDetailModel fakeModel = new FakeSessionDetailModelKeynote(mSessionUri,
mActivityRule.getActivity().getApplicationContext(),
new SessionsHelper(mActivityRule.getActivity()));
// Set up the presenter with the fake model.
final PresenterFragmentImpl presenter = mActivityRule.getActivity()
.addPresenterFragment(R.id.session_detail_frag, fakeModel,
SessionDetailModel.SessionDetailQueryEnum.values(),
SessionDetailModel.SessionDetailUserActionEnum.values());
mActivityRule.getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
presenter.getLoaderManager().restartLoader(0, null, presenter);
}
});
}
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:22,代码来源:SessionDetailActivityTestKeynoteSession.java
示例2: setUpModel
import com.google.samples.apps.iosched.util.SessionsHelper; //导入依赖的package包/类
@Before
public void setUpModel() {
// Create a fake model to simulate a session in schedule.
SessionDetailModel fakeModel = new FakeSessionDetailModelInSchedule(mSessionUri,
mActivityRule.getActivity().getApplicationContext(),
new SessionsHelper(mActivityRule.getActivity()));
// Set up the presenter with the fake model.
final PresenterFragmentImpl presenter = mActivityRule.getActivity()
.addPresenterFragment(R.id.session_detail_frag, fakeModel,
SessionDetailModel.SessionDetailQueryEnum.values(),
SessionDetailModel.SessionDetailUserActionEnum.values());
mActivityRule.getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
presenter.getLoaderManager().restartLoader(0, null, presenter);
}
});
}
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:22,代码来源:SessionDetailActivityTestSessionInSchedule.java
示例3: setUpModel
import com.google.samples.apps.iosched.util.SessionsHelper; //导入依赖的package包/类
@Before
public void setUpModel() {
// Create a fake model to simulate a live session.
SessionDetailModel fakeModel = new FakeSessionDetailModelLive(mSessionUri,
mActivityRule.getActivity().getApplicationContext(),
new SessionsHelper(mActivityRule.getActivity()));
// Set up the presenter with the fake model.
final PresenterFragmentImpl presenter = mActivityRule.getActivity()
.addPresenterFragment(R.id.session_detail_frag, fakeModel,
SessionDetailModel.SessionDetailQueryEnum.values(),
SessionDetailModel.SessionDetailUserActionEnum.values());
mActivityRule.getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
presenter.getLoaderManager().restartLoader(0, null, presenter);
}
});
}
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:22,代码来源:SessionDetailActivityTestLiveSession.java
示例4: setUpModel
import com.google.samples.apps.iosched.util.SessionsHelper; //导入依赖的package包/类
@Before
public void setUpModel() {
// Create a fake model to simulate a session not in schedule.
SessionDetailModel fakeModel = new FakeSessionDetailModelNotInSchedule(mSessionUri,
mActivityRule.getActivity().getApplicationContext(),
new SessionsHelper(mActivityRule.getActivity()));
// Set up the presenter with the fake model.
final PresenterFragmentImpl presenter = mActivityRule.getActivity()
.addPresenterFragment(R.id.session_detail_frag, fakeModel,
SessionDetailModel.SessionDetailQueryEnum.values(),
SessionDetailModel.SessionDetailUserActionEnum.values());
mActivityRule.getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
presenter.getLoaderManager().restartLoader(0, null, presenter);
}
});
}
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:22,代码来源:SessionDetailActivityTestSessionNotInSchedule.java
示例5: initPresenter
import com.google.samples.apps.iosched.util.SessionsHelper; //导入依赖的package包/类
private void initPresenter() {
mModel = ModelProvider.provideMyScheduleModel(
new ScheduleHelper(this),
new SessionsHelper(this),
this);
TagFilterHolder filters = mScheduleFilterFragment.getFilters();
mModel.setFilters(filters);
final SchedulePagerFragment contentFragment =
(SchedulePagerFragment) getSupportFragmentManager()
.findFragmentById(R.id.my_content);
contentFragment.onFiltersChanged(filters);
// Each fragment in the pager adapter is an updatable view that the presenter must know
mPresenter = new PresenterImpl<>(
mModel,
contentFragment.getDayFragments(),
ScheduleModel.MyScheduleUserActionEnum.values(),
ScheduleModel.MyScheduleQueryEnum.values());
}
开发者ID:google,项目名称:iosched,代码行数:21,代码来源:ScheduleActivity.java
示例6: setupShareMenuItemDeferred
import com.google.samples.apps.iosched.util.SessionsHelper; //导入依赖的package包/类
private void setupShareMenuItemDeferred() {
mDeferredUiOperations.add(new Runnable() {
@Override
public void run() {
new SessionsHelper(SessionDetailActivity.this).tryConfigureShareMenuItem(mShareMenuItem,
R.string.share_template, mTitleString, mHashTag, mUrl);
}
});
tryExecuteDeferredUiOperations();
}
开发者ID:gdg-bh,项目名称:AppDevFestSudeste2015,代码行数:11,代码来源:SessionDetailActivity.java
示例7: onOptionsItemSelected
import com.google.samples.apps.iosched.util.SessionsHelper; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
SessionsHelper helper = new SessionsHelper(this);
switch (item.getItemId()) {
// case R.id.menu_map_room:
// /* [ANALYTICS:EVENT]
// * TRIGGER: Click on the Map action on the Session Details page.
// * CATEGORY: 'Session'
// * ACTION: 'Map'
// * LABEL: session title/subtitle
// * [/ANALYTICS]
// */
// AnalyticsManager.sendEvent("Session", "Map", mTitleString, 0L);
// helper.startMapActivity(mRoomId);
// return true;
case R.id.menu_share:
// On ICS+ devices, we normally won't reach this as ShareActionProvider will handle
// sharing.
helper.shareSession(this, R.string.share_template, mTitleString,
mHashTag, mUrl);
return true;
case R.id.menu_social_stream:
if (!TextUtils.isEmpty(mHashTag)) {
/* [ANALYTICS:EVENT]
* TRIGGER: Click on the Social Stream action on the Session Details page.
* CATEGORY: 'Session'
* ACTION: 'Stream'
* LABEL: session title/subtitle
* [/ANALYTICS]
*/
AnalyticsManager.sendEvent("Session", "Stream", mTitleString, 0L);
UIUtils.showHashtagStream(this, mHashTag);
}
return true;
}
return false;
}
开发者ID:gdg-bh,项目名称:AppDevFestSudeste2015,代码行数:40,代码来源:SessionDetailActivity.java
示例8: onOptionsItemSelected
import com.google.samples.apps.iosched.util.SessionsHelper; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_captions:
if (mIsFullscreen) {
if (mFullscreenCaptions.getVisibility() == View.GONE) {
mFullscreenCaptions.setVisibility(View.VISIBLE);
SessionCaptionsFragment captionsFragment;
captionsFragment = (SessionCaptionsFragment)
getFragmentManager().findFragmentByTag(TAG_CAPTIONS);
if (captionsFragment == null) {
captionsFragment = new SessionCaptionsFragment();
captionsFragment.setDarkTheme(true);
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.add(R.id.fullscreen_captions, captionsFragment, TAG_CAPTIONS);
ft.commit();
}
captionsFragment.updateViews(mCaptionsUrl);
return true;
}
}
mFullscreenCaptions.setVisibility(View.GONE);
break;
case R.id.menu_share:
if (mSessionShareData != null) {
new SessionsHelper(this).shareSession(this,
R.string.share_livestream_template,
mSessionShareData.title,
mSessionShareData.hashtag,
mSessionShareData.sessionUrl);
return true;
}
break;
}
return super.onOptionsItemSelected(item);
}
开发者ID:gdg-bh,项目名称:AppDevFestSudeste2015,代码行数:37,代码来源:SessionLivestreamActivity.java
示例9: provideSessionDetailModel
import com.google.samples.apps.iosched.util.SessionsHelper; //导入依赖的package包/类
public static SessionDetailModel provideSessionDetailModel(Uri sessionUri, Context context,
SessionsHelper sessionsHelper, LoaderManager loaderManager) {
if (stubSessionDetailModel != null) {
return stubSessionDetailModel;
} else {
return new SessionDetailModel(sessionUri, context, sessionsHelper, loaderManager);
}
}
开发者ID:google,项目名称:iosched,代码行数:9,代码来源:ModelProvider.java
示例10: provideMyScheduleModel
import com.google.samples.apps.iosched.util.SessionsHelper; //导入依赖的package包/类
public static ScheduleModel provideMyScheduleModel(ScheduleHelper scheduleHelper,
SessionsHelper sessionsHelper, Context context) {
ScheduleModel model = stubScheduleModel != null
? stubScheduleModel
: new ScheduleModel(scheduleHelper, sessionsHelper, context);
model.initStaticDataAndObservers();
return model;
}
开发者ID:google,项目名称:iosched,代码行数:9,代码来源:ModelProvider.java
示例11: onActivityCreated
import com.google.samples.apps.iosched.util.SessionsHelper; //导入依赖的package包/类
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mHandler = new Handler();
// init presenter
SessionDetailModel model = ModelProvider.provideSessionDetailModel(
((SessionDetailActivity) getActivity()).getSessionUri(), getContext(),
new SessionsHelper(getActivity()), getLoaderManager());
mPresenter =
new SessionDetailPresenter(model, this, SessionDetailUserActionEnum.values(),
SessionDetailQueryEnum.values());
mPresenter.loadInitialQueries();
}
开发者ID:google,项目名称:iosched,代码行数:15,代码来源:SessionDetailFragment.java
示例12: SessionDetailModel
import com.google.samples.apps.iosched.util.SessionsHelper; //导入依赖的package包/类
public SessionDetailModel(Uri sessionUri, Context context, SessionsHelper sessionsHelper,
LoaderManager loaderManager) {
super(SessionDetailQueryEnum.values(), SessionDetailUserActionEnum.values(), loaderManager);
mContext = context;
mSessionsHelper = sessionsHelper;
mSessionUri = sessionUri;
mSessionId = extractSessionId(sessionUri);
}
开发者ID:google,项目名称:iosched,代码行数:9,代码来源:SessionDetailModel.java
示例13: onBookmarkClicked
import com.google.samples.apps.iosched.util.SessionsHelper; //导入依赖的package包/类
@Override
public void onBookmarkClicked(String sessionId, boolean isInSchedule) {
MyScheduleUserActionEnum action = isInSchedule
? MyScheduleUserActionEnum.SESSION_UNSTAR
: MyScheduleUserActionEnum.SESSION_STAR;
Bundle args = new Bundle();
args.putString(ScheduleModel.SESSION_ID_KEY, sessionId);
mListener.onUserAction(action, args);
SessionsHelper.showBookmarkClickedHint(getActivity().findViewById(android.R.id.content),
!isInSchedule);
}
开发者ID:google,项目名称:iosched,代码行数:12,代码来源:ScheduleSingleDayFragment.java
示例14: ScheduleModel
import com.google.samples.apps.iosched.util.SessionsHelper; //导入依赖的package包/类
/**
* @param scheduleHelper
* @param context Should be an Activity context
*/
public ScheduleModel(@NonNull ScheduleHelper scheduleHelper,
@NonNull SessionsHelper sessionsHelper,
@NonNull Context context) {
mContext = context;
mScheduleHelper = scheduleHelper;
mSessionsHelper = sessionsHelper;
}
开发者ID:google,项目名称:iosched,代码行数:12,代码来源:ScheduleModel.java
示例15: onCreate
import com.google.samples.apps.iosched.util.SessionsHelper; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
UIUtils.tryTranslateHttpIntent(this);
BeamUtils.tryUpdateIntentFromBeam(this);
boolean shouldBeFloatingWindow = shouldBeFloatingWindow();
if (shouldBeFloatingWindow) {
setupFloatingWindow(R.dimen.session_details_floating_width,
R.dimen.session_details_floating_height, 1, 0.4f);
}
super.onCreate(savedInstanceState);
setContentView(R.layout.session_detail_act);
final Toolbar toolbar = getActionBarToolbar();
toolbar.setNavigationIcon(shouldBeFloatingWindow
? R.drawable.ic_ab_close : R.drawable.ic_up);
toolbar.setNavigationContentDescription(R.string.close_and_go_back);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
}
});
mHandler.post(new Runnable() {
@Override
public void run() {
// Do not display the Activity name in the toolbar
toolbar.setTitle("");
}
});
if (savedInstanceState == null) {
Uri sessionUri = getIntent().getData();
BeamUtils.setBeamSessionUri(this, sessionUri);
}
mSessionUri = getIntent().getData();
if (mSessionUri == null) {
LOGE(TAG, "SessionDetailActivity started with null session Uri!");
finish();
return;
}
addPresenterFragment(R.id.session_detail_frag,
new SessionDetailModel(mSessionUri, getApplicationContext(),
new SessionsHelper(this)), SessionDetailQueryEnum.values(),
SessionDetailUserActionEnum.values());
}
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:50,代码来源:SessionDetailActivity.java
示例16: SessionDetailModel
import com.google.samples.apps.iosched.util.SessionsHelper; //导入依赖的package包/类
public SessionDetailModel(Uri sessionUri, Context context, SessionsHelper sessionsHelper) {
mContext = context;
mSessionsHelper = sessionsHelper;
mSessionUri = sessionUri;
}
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:6,代码来源:SessionDetailModel.java
示例17: FakeSessionDetailModelKeynote
import com.google.samples.apps.iosched.util.SessionsHelper; //导入依赖的package包/类
public FakeSessionDetailModelKeynote(Uri sessionUri, Context context,
SessionsHelper sessionsHelper) {
super(sessionUri, context, sessionsHelper);
}
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:5,代码来源:SessionDetailActivityTestKeynoteSession.java
示例18: FakeSessionDetailModelInSchedule
import com.google.samples.apps.iosched.util.SessionsHelper; //导入依赖的package包/类
public FakeSessionDetailModelInSchedule(Uri sessionUri, Context context,
SessionsHelper sessionsHelper) {
super(sessionUri, context, sessionsHelper);
}
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:5,代码来源:SessionDetailActivityTestSessionInSchedule.java
示例19: FakeSessionDetailModelLive
import com.google.samples.apps.iosched.util.SessionsHelper; //导入依赖的package包/类
public FakeSessionDetailModelLive(Uri sessionUri, Context context,
SessionsHelper sessionsHelper) {
super(sessionUri, context, sessionsHelper);
}
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:5,代码来源:SessionDetailActivityTestLiveSession.java
示例20: FakeSessionDetailModelNotInSchedule
import com.google.samples.apps.iosched.util.SessionsHelper; //导入依赖的package包/类
public FakeSessionDetailModelNotInSchedule(Uri sessionUri, Context context,
SessionsHelper sessionsHelper) {
super(sessionUri, context, sessionsHelper);
}
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:5,代码来源:SessionDetailActivityTestSessionNotInSchedule.java
注:本文中的com.google.samples.apps.iosched.util.SessionsHelper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论