Java Code Examples for dagger.multibindings.StringKey

The following examples show how to use dagger.multibindings.StringKey. These examples are extracted from open source projects. 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 Project: firebase-android-sdk   Source File: InflaterConfigModule.java    License: 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 2
Source Project: firebase-android-sdk   Source File: InflaterConfigModule.java    License: 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 3
Source Project: firebase-android-sdk   Source File: InflaterConfigModule.java    License: 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 4
Source Project: firebase-android-sdk   Source File: InflaterConfigModule.java    License: 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 5
Source Project: firebase-android-sdk   Source File: InflaterConfigModule.java    License: 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 6
Source Project: firebase-android-sdk   Source File: InflaterConfigModule.java    License: 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 7
Source Project: firebase-android-sdk   Source File: InflaterConfigModule.java    License: 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 8
Source Project: firebase-android-sdk   Source File: InflaterConfigModule.java    License: 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 9
@Provides
@IntoMap
@StringKey(ScalarInputSpec.TYPE)
public SensorDiscoverer providesScalarInputDiscoverer(
    Context context, UsageTracker usageTracker) {
  return new ScalarInputDiscoverer(new ScalarSensorServiceFinder(context), context, usageTracker);
}
 
Example 10
Source Project: MOE   Source File: OneMigrationDirective.java    License: 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 11
Source Project: MOE   Source File: MigrateBranchDirective.java    License: 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 12
Source Project: MOE   Source File: GithubPullDirective.java    License: 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 13
Source Project: MOE   Source File: DetermineMigrationsDirective.java    License: 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 14
Source Project: MOE   Source File: BookkeepingDirective.java    License: Apache License 2.0 5 votes vote down vote up
@Override
@Provides
@IntoMap
@StringKey(COMMAND)
public String description() {
  return "Updates the database";
}
 
Example 15
Source Project: MOE   Source File: CreateCodebaseDirective.java    License: 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 16
Source Project: MOE   Source File: HighestRevisionDirective.java    License: 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 17
Source Project: MOE   Source File: MergeCodebasesDirective.java    License: 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 18
Source Project: MOE   Source File: DetermineMetadataDirective.java    License: 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 19
Source Project: MOE   Source File: ChangeDirective.java    License: Apache License 2.0 5 votes vote down vote up
@Override
@Provides
@IntoMap
@StringKey(COMMAND)
public String description() {
  return "Creates a (pending) change";
}
 
Example 20
Source Project: MOE   Source File: LastEquivalenceDirective.java    License: 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 21
Source Project: MOE   Source File: NoteEquivalenceDirective.java    License: 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 22
Source Project: MOE   Source File: CheckConfigDirective.java    License: 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 23
Source Project: MOE   Source File: FindEquivalenceDirective.java    License: 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 24
Source Project: MOE   Source File: MagicDirective.java    License: 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 Project: MOE   Source File: DiffCodebasesDirective.java    License: 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 Project: nextrtc-signaling-server   Source File: NextRTCSignals.java    License: 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 Project: nextrtc-signaling-server   Source File: NextRTCSignals.java    License: MIT License 5 votes vote down vote up
@Provides
@Singleton
@IntoMap
@StringKey(Signals.CANDIDATE_HANDLER)
static SignalHandler CandidateHandler() {
    return new CandidateHandler();
}
 
Example 28
Source Project: nextrtc-signaling-server   Source File: NextRTCSignals.java    License: 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 Project: nextrtc-signaling-server   Source File: NextRTCSignals.java    License: 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 Project: nextrtc-signaling-server   Source File: NextRTCSignals.java    License: 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);
}