dagger.multibindings.StringKey Java Examples

The following examples show how to use dagger.multibindings.StringKey. 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: InflaterConfigModule.java    From firebase-android-sdk with Apache License 2.0 6 votes vote down vote up
@Provides
@IntoMap
@StringKey(LayoutConfigKey.BANNER_LANDSCAPE)
public InAppMessageLayoutConfig providesBannerLandscapeLayoutConfig(
    DisplayMetrics displayMetrics) {
  return InAppMessageLayoutConfig.builder()
      .setMaxImageHeightWeight(0.3f)
      .setMaxImageWidthWeight(0.3f)
      .setMaxDialogHeightPx((int) (0.5f * displayMetrics.heightPixels))
      .setMaxDialogWidthPx((int) (0.9f * displayMetrics.widthPixels))
      .setViewWindowGravity(Gravity.TOP)
      .setWindowFlag(ENABLED_BG_FLAG)
      .setWindowWidth(ViewGroup.LayoutParams.MATCH_PARENT)
      .setWindowHeight(ViewGroup.LayoutParams.WRAP_CONTENT)
      .setBackgroundEnabled(true)
      .setAnimate(true)
      .setAutoDismiss(true)
      .build();
}
 
Example #2
Source File: InflaterConfigModule.java    From firebase-android-sdk with Apache License 2.0 6 votes vote down vote up
@Provides
@IntoMap
@StringKey(LayoutConfigKey.BANNER_PORTRAIT)
public InAppMessageLayoutConfig providesBannerPortraitLayoutConfig(
    DisplayMetrics displayMetrics) {
  return InAppMessageLayoutConfig.builder()
      .setMaxImageHeightWeight(0.3f)
      .setMaxImageWidthWeight(0.3f)
      .setMaxDialogHeightPx((int) (0.5f * displayMetrics.heightPixels))
      .setMaxDialogWidthPx((int) (0.9f * displayMetrics.widthPixels))
      .setViewWindowGravity(Gravity.TOP)
      .setWindowFlag(ENABLED_BG_FLAG)
      .setWindowWidth(ViewGroup.LayoutParams.MATCH_PARENT)
      .setWindowHeight(ViewGroup.LayoutParams.WRAP_CONTENT)
      .setBackgroundEnabled(true)
      .setAnimate(true)
      .setAutoDismiss(true)
      .build();
}
 
Example #3
Source File: InflaterConfigModule.java    From firebase-android-sdk with Apache License 2.0 6 votes vote down vote up
@Provides
@IntoMap
@StringKey(LayoutConfigKey.CARD_PORTRAIT)
public InAppMessageLayoutConfig providesCardPortraitConfig(DisplayMetrics displayMetrics) {
  return InAppMessageLayoutConfig.builder()
      .setMaxDialogHeightPx((int) (0.8 * displayMetrics.heightPixels))
      .setMaxDialogWidthPx((int) (0.7f * displayMetrics.widthPixels))
      .setMaxImageHeightWeight(0.6f)
      .setMaxImageWidthWeight(1f) // entire dialog width
      .setMaxBodyHeightWeight(0.1f)
      .setMaxBodyWidthWeight(0.9f) // entire dialog width
      .setViewWindowGravity(Gravity.CENTER)
      .setWindowFlag(DISMISSIBLE_DIALOG_FLAG)
      .setWindowWidth(ViewGroup.LayoutParams.WRAP_CONTENT)
      .setWindowHeight(ViewGroup.LayoutParams.WRAP_CONTENT)
      .setBackgroundEnabled(false)
      .setAnimate(false)
      .setAutoDismiss(false)
      .build();
}
 
Example #4
Source File: InflaterConfigModule.java    From firebase-android-sdk with Apache License 2.0 6 votes vote down vote up
@Provides
@IntoMap
@StringKey(LayoutConfigKey.CARD_LANDSCAPE)
public InAppMessageLayoutConfig providesCardLandscapeConfig(DisplayMetrics displayMetrics) {
  return InAppMessageLayoutConfig.builder()
      .setMaxDialogHeightPx((int) (0.8 * displayMetrics.heightPixels))
      .setMaxDialogWidthPx(displayMetrics.widthPixels)
      .setMaxImageHeightWeight(1f) // entire dialog height
      .setMaxImageWidthWeight(0.5f)
      .setViewWindowGravity(Gravity.CENTER)
      .setWindowFlag(DISMISSIBLE_DIALOG_FLAG)
      .setWindowWidth(ViewGroup.LayoutParams.WRAP_CONTENT)
      .setWindowHeight(ViewGroup.LayoutParams.WRAP_CONTENT)
      .setBackgroundEnabled(false)
      .setAnimate(false)
      .setAutoDismiss(false)
      .build();
}
 
Example #5
Source File: InflaterConfigModule.java    From firebase-android-sdk with Apache License 2.0 6 votes vote down vote up
@Provides
@IntoMap
@StringKey(LayoutConfigKey.MODAL_PORTRAIT)
public InAppMessageLayoutConfig providesModalPortraitConfig(DisplayMetrics displayMetrics) {
  return InAppMessageLayoutConfig.builder()
      .setMaxDialogHeightPx((int) (0.8 * displayMetrics.heightPixels))
      .setMaxDialogWidthPx((int) (0.7f * displayMetrics.widthPixels))
      .setMaxImageHeightWeight(0.6f)
      .setMaxBodyHeightWeight(0.1f)
      .setMaxImageWidthWeight(0.9f) // entire dialog width
      .setMaxBodyWidthWeight(0.9f) // entire dialog width
      .setViewWindowGravity(Gravity.CENTER)
      .setWindowFlag(DISABLED_BG_FLAG)
      .setWindowWidth(ViewGroup.LayoutParams.MATCH_PARENT)
      .setWindowHeight(ViewGroup.LayoutParams.WRAP_CONTENT)
      .setBackgroundEnabled(false)
      .setAnimate(false)
      .setAutoDismiss(false)
      .build();
}
 
Example #6
Source File: InflaterConfigModule.java    From firebase-android-sdk with Apache License 2.0 6 votes vote down vote up
@Provides
@IntoMap
@StringKey(LayoutConfigKey.IMAGE_ONLY_PORTRAIT)
public InAppMessageLayoutConfig providesPortraitImageLayoutConfig(DisplayMetrics displayMetrics) {
  return InAppMessageLayoutConfig.builder()
      .setMaxDialogHeightPx((int) (0.9f * displayMetrics.heightPixels))
      .setMaxDialogWidthPx((int) (0.9f * displayMetrics.widthPixels))
      .setMaxImageWidthWeight(0.8f)
      .setMaxImageHeightWeight(0.8f)
      .setViewWindowGravity(Gravity.CENTER)
      .setWindowFlag(DISABLED_BG_FLAG)
      .setWindowWidth(ViewGroup.LayoutParams.WRAP_CONTENT)
      .setWindowHeight(ViewGroup.LayoutParams.WRAP_CONTENT)
      .setBackgroundEnabled(false)
      .setAnimate(false)
      .setAutoDismiss(false)
      .build();
}
 
Example #7
Source File: InflaterConfigModule.java    From firebase-android-sdk with Apache License 2.0 6 votes vote down vote up
@Provides
@IntoMap
@StringKey(LayoutConfigKey.IMAGE_ONLY_LANDSCAPE)
public InAppMessageLayoutConfig providesLandscapeImageLayoutConfig(
    DisplayMetrics displayMetrics) {
  return InAppMessageLayoutConfig.builder()
      .setMaxDialogHeightPx((int) (0.9f * displayMetrics.heightPixels))
      .setMaxDialogWidthPx((int) (0.9f * displayMetrics.widthPixels))
      .setMaxImageWidthWeight(0.8f)
      .setMaxImageHeightWeight(0.8f)
      .setViewWindowGravity(Gravity.CENTER)
      .setWindowFlag(DISABLED_BG_FLAG)
      .setWindowWidth(ViewGroup.LayoutParams.WRAP_CONTENT)
      .setWindowHeight(ViewGroup.LayoutParams.WRAP_CONTENT)
      .setBackgroundEnabled(false)
      .setAnimate(false)
      .setAutoDismiss(false)
      .build();
}
 
Example #8
Source File: InflaterConfigModule.java    From firebase-android-sdk with Apache License 2.0 6 votes vote down vote up
@Provides
@IntoMap
@StringKey(LayoutConfigKey.MODAL_LANDSCAPE)
public InAppMessageLayoutConfig providesModalLandscapeConfig(DisplayMetrics displayMetrics) {
  return InAppMessageLayoutConfig.builder()
      .setMaxDialogHeightPx((int) (0.8 * displayMetrics.heightPixels))
      .setMaxDialogWidthPx(displayMetrics.widthPixels)
      .setMaxImageHeightWeight(1f) // entire dialog height
      .setMaxImageWidthWeight(0.4f)
      .setMaxBodyHeightWeight(0.6f)
      .setMaxBodyWidthWeight(0.4f)
      .setViewWindowGravity(Gravity.CENTER)
      .setWindowFlag(DISABLED_BG_FLAG)
      .setWindowWidth(ViewGroup.LayoutParams.MATCH_PARENT)
      .setWindowHeight(ViewGroup.LayoutParams.MATCH_PARENT)
      .setBackgroundEnabled(false)
      .setAnimate(false)
      .setAutoDismiss(false)
      .build();
}
 
Example #9
Source File: NoteEquivalenceDirective.java    From MOE with Apache License 2.0 5 votes vote down vote up
@Override
@Provides
@IntoMap
@StringKey(COMMAND)
public String description() {
  return "Notes a new equivalence in the database file.";
}
 
Example #10
Source File: HighestRevisionDirective.java    From MOE with Apache License 2.0 5 votes vote down vote up
@Override
@Provides
@IntoMap
@StringKey(COMMAND)
public String description() {
  return "Finds the highest revision in a source control repository";
}
 
Example #11
Source File: LastEquivalenceDirective.java    From MOE with Apache License 2.0 5 votes vote down vote up
@Override
@Provides
@IntoMap
@StringKey(COMMAND)
public String description() {
  return "Finds the last known equivalence between two repositories";
}
 
Example #12
Source File: ChangeDirective.java    From MOE with Apache License 2.0 5 votes vote down vote up
@Override
@Provides
@IntoMap
@StringKey(COMMAND)
public String description() {
  return "Creates a (pending) change";
}
 
Example #13
Source File: DetermineMetadataDirective.java    From MOE with Apache License 2.0 5 votes vote down vote up
@Override
@Provides
@IntoMap
@StringKey(COMMAND)
public String description() {
  return "Consolidates the metadata for a set of revisions";
}
 
Example #14
Source File: MergeCodebasesDirective.java    From MOE with Apache License 2.0 5 votes vote down vote up
@Override
@Provides
@IntoMap
@StringKey(COMMAND)
public String description() {
  return "Merges three codebases into a new codebase";
}
 
Example #15
Source File: OneMigrationDirective.java    From MOE with Apache License 2.0 5 votes vote down vote up
@Override
@Provides
@IntoMap
@StringKey(COMMAND)
public String description() {
  return "Performs a single configured migration";
}
 
Example #16
Source File: MigrateBranchDirective.java    From MOE with Apache License 2.0 5 votes vote down vote up
@Override
@Provides
@IntoMap
@StringKey(COMMAND)
public String description() {
  return "Perform a one-directional merge from a branch onto a target repository.";
}
 
Example #17
Source File: GithubPullDirective.java    From MOE with Apache License 2.0 5 votes vote down vote up
@Override
@Provides
@IntoMap
@StringKey(COMMAND)
public String description() {
  return "Migrates the branch underlying a github pull request into a configured repository";
}
 
Example #18
Source File: DetermineMigrationsDirective.java    From MOE with Apache License 2.0 5 votes vote down vote up
@Override
@Provides
@IntoMap
@StringKey(COMMAND)
public String description() {
  return "Finds and prints the unmigrated revisions for a named migration configuration";
}
 
Example #19
Source File: BookkeepingDirective.java    From MOE with Apache License 2.0 5 votes vote down vote up
@Override
@Provides
@IntoMap
@StringKey(COMMAND)
public String description() {
  return "Updates the database";
}
 
Example #20
Source File: CreateCodebaseDirective.java    From MOE with Apache License 2.0 5 votes vote down vote up
@Override
@Provides
@IntoMap
@StringKey(COMMAND)
public String description() {
  return "Creates a codebase from a codebase expression";
}
 
Example #21
Source File: CheckConfigDirective.java    From MOE with Apache License 2.0 5 votes vote down vote up
@Override
@Provides
@IntoMap
@StringKey(COMMAND)
public String description() {
  return "Checks that the project's configuration is valid";
}
 
Example #22
Source File: FindEquivalenceDirective.java    From MOE with Apache License 2.0 5 votes vote down vote up
@Override
@Provides
@IntoMap
@StringKey(COMMAND)
public String description() {
  return "Finds revisions in one repository that are equivalent to a given revision in another";
}
 
Example #23
Source File: ScalarInputDiscoveryModule.java    From science-journal with Apache License 2.0 5 votes vote down vote up
@Provides
@IntoMap
@StringKey(ScalarInputSpec.TYPE)
public SensorDiscoverer providesScalarInputDiscoverer(
    Context context, UsageTracker usageTracker) {
  return new ScalarInputDiscoverer(new ScalarSensorServiceFinder(context), context, usageTracker);
}
 
Example #24
Source File: MagicDirective.java    From MOE with Apache License 2.0 5 votes vote down vote up
@Override
@Provides
@IntoMap
@StringKey(COMMAND)
public String description() {
  return "Updates database and performs any configured migrations that have pending commits";
}
 
Example #25
Source File: DiffCodebasesDirective.java    From MOE with Apache License 2.0 5 votes vote down vote up
@Override
@Provides
@IntoMap
@StringKey(COMMAND)
public String description() {
  return "Prints the diff output between two codebase expressions";
}
 
Example #26
Source File: NextRTCSignals.java    From nextrtc-signaling-server with MIT License 5 votes vote down vote up
@Provides
@Singleton
@IntoMap
@StringKey(Signals.ANSWER_RESPONSE_HANDLER)
static SignalHandler AnswerResponseHandler() {
    return new AnswerResponseHandler();
}
 
Example #27
Source File: NextRTCSignals.java    From nextrtc-signaling-server with MIT License 5 votes vote down vote up
@Provides
@Singleton
@IntoMap
@StringKey(Signals.CANDIDATE_HANDLER)
static SignalHandler CandidateHandler() {
    return new CandidateHandler();
}
 
Example #28
Source File: NextRTCSignals.java    From nextrtc-signaling-server with MIT License 5 votes vote down vote up
@Provides
@Singleton
@IntoMap
@StringKey(Signals.CREATE_HANDLER)
static SignalHandler CreateConversationEntry(CreateConversation conversation) {
    return conversation;
}
 
Example #29
Source File: NextRTCSignals.java    From nextrtc-signaling-server with MIT License 5 votes vote down vote up
@Provides
@Singleton
@IntoMap
@StringKey(Signals.JOIN_HANDLER)
static SignalHandler JoinConversation(ConversationRepository conversations,
                                      CreateConversation create,
                                      NextRTCProperties properties) {
    return new JoinConversation(conversations, create, properties);
}
 
Example #30
Source File: NextRTCSignals.java    From nextrtc-signaling-server with MIT License 5 votes vote down vote up
@Provides
@Singleton
@IntoMap
@StringKey(Signals.LEFT_HANDLER)
static SignalHandler LeftConversation(NextRTCEventBus eventBus,
                                      ConversationRepository conversations) {
    return new LeftConversation(eventBus, conversations);
}